mirror of
				https://github.com/KevinMidboe/immich.git
				synced 2025-10-29 17:40:28 +00:00 
			
		
		
		
	Delete assets from server if local deletion fails (#260)
* Delete assets from server if local deletion fails * Remove commented line
This commit is contained in:
		@@ -1,3 +1,4 @@
 | 
			
		||||
import 'package:flutter/foundation.dart';
 | 
			
		||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
 | 
			
		||||
import 'package:immich_mobile/modules/home/models/delete_asset_response.model.dart';
 | 
			
		||||
import 'package:immich_mobile/modules/home/services/asset.service.dart';
 | 
			
		||||
@@ -45,9 +46,12 @@ class AssetNotifier extends StateNotifier<List<ImmichAsset>> {
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // final List<String> result = await PhotoManager.editor.deleteWithIds(deleteIdList);
 | 
			
		||||
    await PhotoManager.editor.deleteWithIds(deleteIdList);
 | 
			
		||||
    
 | 
			
		||||
    try {
 | 
			
		||||
      await PhotoManager.editor.deleteWithIds(deleteIdList);
 | 
			
		||||
    } catch (e) {
 | 
			
		||||
      debugPrint("Delete asset from device failed: $e");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Delete asset on server
 | 
			
		||||
    List<DeleteAssetResponse>? deleteAssetResult =
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user