mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-02 06:46:22 +01:00
Hide processing notification when removing from viewer
This commit is contained in:
parent
c398dabc03
commit
f004fc6801
2 changed files with 11 additions and 7 deletions
|
@ -27,6 +27,7 @@ class RemoveSelectionHandler {
|
||||||
bool shouldCleanupAlbum = true,
|
bool shouldCleanupAlbum = true,
|
||||||
bool isRemoveOpened = false,
|
bool isRemoveOpened = false,
|
||||||
bool isMoveToTrash = false,
|
bool isMoveToTrash = false,
|
||||||
|
bool shouldShowProcessingText = true,
|
||||||
}) async {
|
}) async {
|
||||||
final selectedFiles = await InflateFileDescriptor(_c)(account, selection);
|
final selectedFiles = await InflateFileDescriptor(_c)(account, selection);
|
||||||
final String processingText, successText;
|
final String processingText, successText;
|
||||||
|
@ -42,13 +43,15 @@ class RemoveSelectionHandler {
|
||||||
failureText =
|
failureText =
|
||||||
(count) => L10n.global().deleteSelectedFailureNotification(count);
|
(count) => L10n.global().deleteSelectedFailureNotification(count);
|
||||||
}
|
}
|
||||||
SnackBarManager().showSnackBar(
|
if (shouldShowProcessingText) {
|
||||||
SnackBar(
|
SnackBarManager().showSnackBar(
|
||||||
content: Text(processingText),
|
SnackBar(
|
||||||
duration: k.snackBarDurationShort,
|
content: Text(processingText),
|
||||||
),
|
duration: k.snackBarDurationShort,
|
||||||
canBeReplaced: true,
|
),
|
||||||
);
|
canBeReplaced: true,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
var failureCount = 0;
|
var failureCount = 0;
|
||||||
await Remove(KiwiContainer().resolve<DiContainer>())(
|
await Remove(KiwiContainer().resolve<DiContainer>())(
|
||||||
|
|
|
@ -653,6 +653,7 @@ class _ViewerState extends State<Viewer>
|
||||||
selection: [file],
|
selection: [file],
|
||||||
isRemoveOpened: true,
|
isRemoveOpened: true,
|
||||||
isMoveToTrash: true,
|
isMoveToTrash: true,
|
||||||
|
shouldShowProcessingText: false,
|
||||||
));
|
));
|
||||||
_removeCurrentItemFromStream(context, index);
|
_removeCurrentItemFromStream(context, index);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue