2025-04-25 05:39:50 +05:30
|
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
2025-06-21 13:35:30 -05:00
|
|
|
import 'package:immich_mobile/services/local_files_manager.service.dart';
|
2025-04-25 05:39:50 +05:30
|
|
|
|
2025-06-21 13:35:30 -05:00
|
|
|
final localFilesManagerRepositoryProvider = Provider(
|
|
|
|
(ref) =>
|
|
|
|
LocalFilesManagerRepository(ref.watch(localFileManagerServiceProvider)),
|
|
|
|
);
|
2025-04-25 05:39:50 +05:30
|
|
|
|
2025-06-21 13:35:30 -05:00
|
|
|
class LocalFilesManagerRepository {
|
2025-06-25 13:06:24 +05:30
|
|
|
const LocalFilesManagerRepository(this._service);
|
2025-06-21 13:35:30 -05:00
|
|
|
|
|
|
|
final LocalFilesManagerService _service;
|
2025-04-25 05:39:50 +05:30
|
|
|
|
|
|
|
Future<bool> moveToTrash(List<String> mediaUrls) async {
|
2025-06-21 13:35:30 -05:00
|
|
|
return await _service.moveToTrash(mediaUrls);
|
2025-04-25 05:39:50 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
Future<bool> restoreFromTrash(String fileName, int type) async {
|
2025-06-21 13:35:30 -05:00
|
|
|
return await _service.restoreFromTrash(fileName, type);
|
2025-04-25 05:39:50 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
Future<bool> requestManageMediaPermission() async {
|
2025-06-21 13:35:30 -05:00
|
|
|
return await _service.requestManageMediaPermission();
|
2025-04-25 05:39:50 +05:30
|
|
|
}
|
|
|
|
}
|