option to hide confirmation message after moving items to the bin
This commit is contained in:
parent
6dc2d81027
commit
c1a176d389
9 changed files with 42 additions and 9 deletions
|
@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
- Viewer: optional gesture to show previous/next item
|
||||
- Albums / Countries / Tags: live title filter
|
||||
- option to hide confirmation message after moving items to the bin
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
@ -630,6 +630,7 @@
|
|||
"settingsConfirmationDialogDeleteItems": "Ask before deleting items forever",
|
||||
"settingsConfirmationDialogMoveToBinItems": "Ask before moving items to the recycle bin",
|
||||
"settingsConfirmationDialogMoveUndatedItems": "Ask before moving undated items",
|
||||
"settingsConfirmationAfterMoveToBinItems": "Show message after moving items to the recycle bin",
|
||||
|
||||
"settingsNavigationDrawerTile": "Navigation menu",
|
||||
"settingsNavigationDrawerEditorTitle": "Navigation Menu",
|
||||
|
|
|
@ -450,6 +450,7 @@
|
|||
"settingsConfirmationDialogDeleteItems": "Suppression définitive d’éléments",
|
||||
"settingsConfirmationDialogMoveToBinItems": "Mise d’éléments à la corbeille",
|
||||
"settingsConfirmationDialogMoveUndatedItems": "Déplacement d’éléments non datés",
|
||||
"settingsConfirmationAfterMoveToBinItems": "Confirmation après mise d’éléments à la corbeille",
|
||||
|
||||
"settingsNavigationDrawerTile": "Menu de navigation",
|
||||
"settingsNavigationDrawerEditorTitle": "Menu de navigation",
|
||||
|
|
|
@ -450,6 +450,7 @@
|
|||
"settingsConfirmationDialogDeleteItems": "항목을 완전히 삭제 시",
|
||||
"settingsConfirmationDialogMoveToBinItems": "항목을 휴지통으로 이동 시",
|
||||
"settingsConfirmationDialogMoveUndatedItems": "날짜가 지정되지 않은 항목을 이동 시",
|
||||
"settingsConfirmationAfterMoveToBinItems": "항목을 휴지통으로 이동 후",
|
||||
|
||||
"settingsNavigationDrawerTile": "탐색 메뉴",
|
||||
"settingsNavigationDrawerEditorTitle": "탐색 메뉴",
|
||||
|
|
|
@ -35,6 +35,7 @@ class SettingsDefaults {
|
|||
static const confirmDeleteForever = true;
|
||||
static const confirmMoveToBin = true;
|
||||
static const confirmMoveUndatedItems = true;
|
||||
static const confirmAfterMoveToBin = true;
|
||||
static const setMetadataDateBeforeFileOp = false;
|
||||
static final drawerTypeBookmarks = [
|
||||
null,
|
||||
|
|
|
@ -65,6 +65,7 @@ class Settings extends ChangeNotifier {
|
|||
static const confirmDeleteForeverKey = 'confirm_delete_forever';
|
||||
static const confirmMoveToBinKey = 'confirm_move_to_bin';
|
||||
static const confirmMoveUndatedItemsKey = 'confirm_move_undated_items';
|
||||
static const confirmAfterMoveToBinKey = 'confirm_after_move_to_bin';
|
||||
static const setMetadataDateBeforeFileOpKey = 'set_metadata_date_before_file_op';
|
||||
static const drawerTypeBookmarksKey = 'drawer_type_bookmarks';
|
||||
static const drawerAlbumBookmarksKey = 'drawer_album_bookmarks';
|
||||
|
@ -351,6 +352,10 @@ class Settings extends ChangeNotifier {
|
|||
|
||||
set confirmMoveUndatedItems(bool newValue) => setAndNotify(confirmMoveUndatedItemsKey, newValue);
|
||||
|
||||
bool get confirmAfterMoveToBin => getBoolOrDefault(confirmAfterMoveToBinKey, SettingsDefaults.confirmAfterMoveToBin);
|
||||
|
||||
set confirmAfterMoveToBin(bool newValue) => setAndNotify(confirmAfterMoveToBinKey, newValue);
|
||||
|
||||
bool get setMetadataDateBeforeFileOp => getBoolOrDefault(setMetadataDateBeforeFileOpKey, SettingsDefaults.setMetadataDateBeforeFileOp);
|
||||
|
||||
set setMetadataDateBeforeFileOp(bool newValue) => setAndNotify(setMetadataDateBeforeFileOpKey, newValue);
|
||||
|
@ -811,6 +816,7 @@ class Settings extends ChangeNotifier {
|
|||
case confirmDeleteForeverKey:
|
||||
case confirmMoveToBinKey:
|
||||
case confirmMoveUndatedItemsKey:
|
||||
case confirmAfterMoveToBinKey:
|
||||
case setMetadataDateBeforeFileOpKey:
|
||||
case showThumbnailFavouriteKey:
|
||||
case showThumbnailTagKey:
|
||||
|
|
|
@ -197,11 +197,14 @@ mixin EntryStorageMixin on FeedbackMixin, PermissionAwareMixin, SizeAwareMixin {
|
|||
);
|
||||
}
|
||||
}
|
||||
showFeedback(
|
||||
context,
|
||||
copy ? l10n.collectionCopySuccessFeedback(count) : l10n.collectionMoveSuccessFeedback(count),
|
||||
action,
|
||||
);
|
||||
|
||||
if (!toBin || (toBin && settings.confirmAfterMoveToBin)) {
|
||||
showFeedback(
|
||||
context,
|
||||
copy ? l10n.collectionCopySuccessFeedback(count) : l10n.collectionMoveSuccessFeedback(count),
|
||||
action,
|
||||
);
|
||||
}
|
||||
|
||||
EntryMovedNotification(moveType, movedEntries).dispatch(context);
|
||||
onSuccess?.call();
|
||||
|
|
|
@ -10,26 +10,33 @@ class ConfirmationDialogPage extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(context.l10n.settingsConfirmationDialogTitle),
|
||||
title: Text(l10n.settingsConfirmationDialogTitle),
|
||||
),
|
||||
body: SafeArea(
|
||||
child: ListView(children: [
|
||||
SettingsSwitchListTile(
|
||||
selector: (context, s) => s.confirmMoveUndatedItems,
|
||||
onChanged: (v) => settings.confirmMoveUndatedItems = v,
|
||||
title: context.l10n.settingsConfirmationDialogMoveUndatedItems,
|
||||
title: l10n.settingsConfirmationDialogMoveUndatedItems,
|
||||
),
|
||||
SettingsSwitchListTile(
|
||||
selector: (context, s) => s.confirmMoveToBin,
|
||||
onChanged: (v) => settings.confirmMoveToBin = v,
|
||||
title: context.l10n.settingsConfirmationDialogMoveToBinItems,
|
||||
title: l10n.settingsConfirmationDialogMoveToBinItems,
|
||||
),
|
||||
SettingsSwitchListTile(
|
||||
selector: (context, s) => s.confirmDeleteForever,
|
||||
onChanged: (v) => settings.confirmDeleteForever = v,
|
||||
title: context.l10n.settingsConfirmationDialogDeleteItems,
|
||||
title: l10n.settingsConfirmationDialogDeleteItems,
|
||||
),
|
||||
const Divider(height: 32),
|
||||
SettingsSwitchListTile(
|
||||
selector: (context, s) => s.confirmAfterMoveToBin,
|
||||
onChanged: (v) => settings.confirmAfterMoveToBin = v,
|
||||
title: l10n.settingsConfirmationAfterMoveToBinItems,
|
||||
),
|
||||
]),
|
||||
),
|
||||
|
|
|
@ -1,21 +1,29 @@
|
|||
{
|
||||
"de": [
|
||||
"settingsConfirmationAfterMoveToBinItems",
|
||||
"settingsViewerGestureSideTapNext"
|
||||
],
|
||||
|
||||
"es": [
|
||||
"settingsConfirmationAfterMoveToBinItems"
|
||||
],
|
||||
|
||||
"fr": [
|
||||
"settingsViewerGestureSideTapNext"
|
||||
],
|
||||
|
||||
"id": [
|
||||
"settingsConfirmationAfterMoveToBinItems",
|
||||
"settingsViewerGestureSideTapNext"
|
||||
],
|
||||
|
||||
"it": [
|
||||
"settingsConfirmationAfterMoveToBinItems",
|
||||
"settingsViewerGestureSideTapNext"
|
||||
],
|
||||
|
||||
"ja": [
|
||||
"settingsConfirmationAfterMoveToBinItems",
|
||||
"settingsViewerGestureSideTapNext"
|
||||
],
|
||||
|
||||
|
@ -24,11 +32,13 @@
|
|||
],
|
||||
|
||||
"pt": [
|
||||
"settingsConfirmationAfterMoveToBinItems",
|
||||
"settingsViewerGestureSideTapNext"
|
||||
],
|
||||
|
||||
"ru": [
|
||||
"filterOnThisDayLabel",
|
||||
"settingsConfirmationAfterMoveToBinItems",
|
||||
"settingsViewerGestureSideTapNext",
|
||||
"settingsSlideshowFillScreen",
|
||||
"settingsScreenSaverPageTitle",
|
||||
|
@ -51,6 +61,7 @@
|
|||
"wallpaperTargetLock",
|
||||
"wallpaperTargetHomeLock",
|
||||
"menuActionSlideshow",
|
||||
"settingsConfirmationAfterMoveToBinItems",
|
||||
"settingsViewerGestureSideTapNext",
|
||||
"settingsViewerSlideshowTile",
|
||||
"settingsViewerSlideshowTitle",
|
||||
|
@ -70,6 +81,7 @@
|
|||
],
|
||||
|
||||
"zh": [
|
||||
"settingsConfirmationAfterMoveToBinItems",
|
||||
"settingsViewerGestureSideTapNext"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue