mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-31 10:37:11 -04:00 
			
		
		
		
	fix(mobile): recently add view show other user assets (#8184)
This commit is contained in:
		
							parent
							
								
									d1e6843f3e
								
							
						
					
					
						commit
						a56cf35d8c
					
				| @ -1,13 +1,18 @@ | ||||
| import 'package:hooks_riverpod/hooks_riverpod.dart'; | ||||
| import 'package:immich_mobile/shared/models/asset.dart'; | ||||
| import 'package:immich_mobile/shared/providers/db.provider.dart'; | ||||
| import 'package:immich_mobile/shared/providers/user.provider.dart'; | ||||
| import 'package:isar/isar.dart'; | ||||
| 
 | ||||
| final recentlyAddedProvider = FutureProvider<List<Asset>>((ref) async { | ||||
|   final user = ref.read(currentUserProvider); | ||||
|   if (user == null) return []; | ||||
| 
 | ||||
|   return ref | ||||
|       .watch(dbProvider) | ||||
|       .assets | ||||
|       .where() | ||||
|       .ownerIdEqualToAnyChecksum(user.isarId) | ||||
|       .sortByFileCreatedAtDesc() | ||||
|       .findAll(); | ||||
| }); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user