mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +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 isRemoveOpened = false,
|
||||
bool isMoveToTrash = false,
|
||||
bool shouldShowProcessingText = true,
|
||||
}) async {
|
||||
final selectedFiles = await InflateFileDescriptor(_c)(account, selection);
|
||||
final String processingText, successText;
|
||||
|
@ -42,13 +43,15 @@ class RemoveSelectionHandler {
|
|||
failureText =
|
||||
(count) => L10n.global().deleteSelectedFailureNotification(count);
|
||||
}
|
||||
SnackBarManager().showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(processingText),
|
||||
duration: k.snackBarDurationShort,
|
||||
),
|
||||
canBeReplaced: true,
|
||||
);
|
||||
if (shouldShowProcessingText) {
|
||||
SnackBarManager().showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(processingText),
|
||||
duration: k.snackBarDurationShort,
|
||||
),
|
||||
canBeReplaced: true,
|
||||
);
|
||||
}
|
||||
|
||||
var failureCount = 0;
|
||||
await Remove(KiwiContainer().resolve<DiContainer>())(
|
||||
|
|
|
@ -653,6 +653,7 @@ class _ViewerState extends State<Viewer>
|
|||
selection: [file],
|
||||
isRemoveOpened: true,
|
||||
isMoveToTrash: true,
|
||||
shouldShowProcessingText: false,
|
||||
));
|
||||
_removeCurrentItemFromStream(context, index);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue