🐛 Fix web uploading

This commit is contained in:
LittleSheep 2024-09-15 22:52:20 +08:00
parent df22b65777
commit 8e8be52658
2 changed files with 5 additions and 1 deletions

View File

@ -152,6 +152,8 @@ class WebSocketProvider extends GetxController {
}
Future<void> registerPushNotifications() async {
if (PlatformInfo.isWeb) return;
final prefs = await SharedPreferences.getInstance();
if (prefs.getBool('service_background_notification') == true) {
log('Background notification service has been enabled, skip register push notifications');

View File

@ -312,7 +312,9 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
}
Widget _buildQueueEntry(AttachmentUploadTask element, int index) {
final extName = extension(element.file.path).substring(1);
final extName = element.file.name.contains('.')
? extension(element.file.name).substring(1)
: '';
final canBeCrop = ['png', 'jpg', 'jpeg', 'gif'].contains(extName);
return Container(