view: fixed source setup when trashing items
This commit is contained in:
parent
2fd9ccb6d3
commit
3be7d90233
4 changed files with 7 additions and 11 deletions
|
@ -152,7 +152,7 @@ dependencies {
|
|||
implementation 'com.github.deckerst:Android-TiffBitmapFactory:876e53870a'
|
||||
// forked, built by JitPack, cf https://jitpack.io/p/deckerst/pixymeta-android
|
||||
implementation 'com.github.deckerst:pixymeta-android:706bd73d6e'
|
||||
implementation 'com.github.bumptech.glide:glide:4.13.0'
|
||||
implementation 'com.github.bumptech.glide:glide:4.13.1'
|
||||
|
||||
kapt 'androidx.annotation:annotation:1.3.0'
|
||||
kapt 'com.github.bumptech.glide:compiler:4.13.0'
|
||||
|
|
|
@ -50,12 +50,6 @@ mixin EntryStorageMixin on FeedbackMixin, PermissionAwareMixin, SizeAwareMixin {
|
|||
))) return;
|
||||
}
|
||||
|
||||
final source = context.read<CollectionSource>();
|
||||
if (source.initState != SourceInitializationState.full) {
|
||||
// source may be uninitialized in viewer mode
|
||||
await source.init();
|
||||
}
|
||||
|
||||
final entriesByDestination = <String, Set<AvesEntry>>{};
|
||||
switch (moveType) {
|
||||
case MoveType.copy:
|
||||
|
@ -116,6 +110,7 @@ mixin EntryStorageMixin on FeedbackMixin, PermissionAwareMixin, SizeAwareMixin {
|
|||
}
|
||||
}
|
||||
|
||||
final source = context.read<CollectionSource>();
|
||||
source.pauseMonitoring();
|
||||
final opId = mediaFileService.newOpId;
|
||||
await showOpReport<MoveOpEvent>(
|
||||
|
|
|
@ -31,6 +31,10 @@ Future<String?> pickAlbum({
|
|||
required MoveType? moveType,
|
||||
}) async {
|
||||
final source = context.read<CollectionSource>();
|
||||
if (source.initState != SourceInitializationState.full) {
|
||||
// source may not be fully initialized in view mode
|
||||
await source.init();
|
||||
}
|
||||
final filter = await Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute<AlbumFilter>(
|
||||
|
|
|
@ -202,10 +202,6 @@ class EntryActionDelegate with FeedbackMixin, PermissionAwareMixin, SizeAwareMix
|
|||
);
|
||||
if (options == null) return;
|
||||
|
||||
final source = context.read<CollectionSource>();
|
||||
if (source.initState != SourceInitializationState.full) {
|
||||
await source.init();
|
||||
}
|
||||
final destinationAlbum = await pickAlbum(context: context, moveType: MoveType.export);
|
||||
if (destinationAlbum == null) return;
|
||||
if (!await checkStoragePermissionForAlbums(context, {destinationAlbum})) return;
|
||||
|
@ -228,6 +224,7 @@ class EntryActionDelegate with FeedbackMixin, PermissionAwareMixin, SizeAwareMix
|
|||
}
|
||||
|
||||
final selectionCount = selection.length;
|
||||
final source = context.read<CollectionSource>();
|
||||
source.pauseMonitoring();
|
||||
await showOpReport<ExportOpEvent>(
|
||||
context: context,
|
||||
|
|
Loading…
Reference in a new issue