2022-04-23 21:08:45 -05:00
|
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
2025-03-12 19:26:56 +05:30
|
|
|
import 'package:immich_mobile/domain/models/user.model.dart';
|
2025-03-14 08:50:26 +05:30
|
|
|
import 'package:immich_mobile/domain/services/user.service.dart';
|
|
|
|
import 'package:immich_mobile/providers/infrastructure/user.provider.dart';
|
2025-03-12 19:26:56 +05:30
|
|
|
import 'package:immich_mobile/providers/user.provider.dart';
|
2022-04-23 21:08:45 -05:00
|
|
|
|
2025-03-12 19:26:56 +05:30
|
|
|
final otherUsersProvider =
|
|
|
|
FutureProvider.autoDispose<List<UserDto>>((ref) async {
|
2022-06-26 03:46:51 +09:00
|
|
|
UserService userService = ref.watch(userServiceProvider);
|
2025-03-12 19:26:56 +05:30
|
|
|
final currentUser = ref.watch(currentUserProvider);
|
2022-04-23 21:08:45 -05:00
|
|
|
|
2025-03-12 19:26:56 +05:30
|
|
|
final allUsers = await userService.getAll();
|
|
|
|
allUsers.removeWhere((u) => currentUser?.id == u.id);
|
|
|
|
return allUsers;
|
2022-04-23 21:08:45 -05:00
|
|
|
});
|