2021-08-21 11:46:00 +02:00
|
|
|
import 'package:nc_photos/account.dart';
|
|
|
|
import 'package:nc_photos/entity/file.dart';
|
|
|
|
import 'package:nc_photos/remote_storage_util.dart' as remote_storage_util;
|
|
|
|
import 'package:nc_photos/use_case/move.dart';
|
|
|
|
|
|
|
|
/// Import a shared album from the pending dir to the library
|
|
|
|
class ImportPendingSharedAlbum {
|
|
|
|
ImportPendingSharedAlbum(this.fileRepo);
|
|
|
|
|
|
|
|
Future<void> call(Account account, File albumFile) => Move(fileRepo)(
|
|
|
|
account,
|
|
|
|
albumFile,
|
2021-10-02 11:29:52 +02:00
|
|
|
"${remote_storage_util.getRemoteAlbumsDir(account)}/${albumFile.filename}",
|
2021-08-21 11:46:00 +02:00
|
|
|
shouldCreateMissingDir: true,
|
|
|
|
);
|
|
|
|
|
|
|
|
final FileRepo fileRepo;
|
|
|
|
}
|