File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import '../services/chunked_uploader.dart';
2323import '../services/notification_service.dart' ;
2424
2525Future <void > _showUploadNotification ({bool success = true }) async {
26+ if (! Preferences .getUploadNotification) return ;
2627 final android = AndroidNotificationDetails (
2728 'piwigo-ng-upload' ,
2829 'Piwigo NG Upload' ,
@@ -124,12 +125,7 @@ Future<List<Map<String, dynamic>>> uploadPhotos(
124125 debugPrint ("$e " );
125126 }
126127 }
127- if (Preferences .getUploadNotification) {
128- if (result.isEmpty) {
129- _showUploadNotification (success: false );
130- }
131- _showUploadNotification (success: true );
132- }
128+ _showUploadNotification (success: result.isNotEmpty);
133129 if (result.isEmpty) return [];
134130 uploadCompletedList = result.map <int >((e) => e['id' ]).toList ();
135131 try {
You can’t perform that action at this time.
0 commit comments