diff --git a/CHANGELOG.md b/CHANGELOG.md index 58560410d..ab61a3005 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,10 @@ All notable changes to this project will be documented in this file. ### Added -- Info: edit location of JPG/PNG/WEBP/DNG images via Exif +- Collection / Info: edit location of JPG/PNG/WEBP/DNG images via Exif - Viewer: resize option when exporting - Settings: export/import covers & favourites along with settings +- Collection: allow rescan when browsing - Portuguese translation (thanks Jonatas De Almeida Barros) ### Removed @@ -21,6 +22,7 @@ All notable changes to this project will be documented in this file. - handling timestamps provided in 10^-8 s (18 digits) - Viewer: SVG export - Viewer: sending to editing app on some environments +- Map: projected center anchoring ## [v1.5.10] - 2022-01-07 diff --git a/lib/model/actions/entry_set_actions.dart b/lib/model/actions/entry_set_actions.dart index bb0b1a62c..5ef1ac427 100644 --- a/lib/model/actions/entry_set_actions.dart +++ b/lib/model/actions/entry_set_actions.dart @@ -15,12 +15,12 @@ enum EntrySetAction { // browsing or selecting map, stats, + rescan, // selecting share, delete, copy, move, - rescan, toggleFavourite, rotateCCW, rotateCW, @@ -46,6 +46,7 @@ class EntrySetActions { EntrySetAction.addShortcut, EntrySetAction.map, EntrySetAction.stats, + EntrySetAction.rescan, ]; static const selection = [ @@ -54,9 +55,9 @@ class EntrySetActions { EntrySetAction.copy, EntrySetAction.move, EntrySetAction.toggleFavourite, - EntrySetAction.rescan, EntrySetAction.map, EntrySetAction.stats, + EntrySetAction.rescan, // editing actions are in their subsection ]; } @@ -86,6 +87,8 @@ extension ExtraEntrySetAction on EntrySetAction { return context.l10n.menuActionMap; case EntrySetAction.stats: return context.l10n.menuActionStats; + case EntrySetAction.rescan: + return context.l10n.collectionActionRescan; // selecting case EntrySetAction.share: return context.l10n.entryActionShare; @@ -95,8 +98,6 @@ extension ExtraEntrySetAction on EntrySetAction { return context.l10n.collectionActionCopy; case EntrySetAction.move: return context.l10n.collectionActionMove; - case EntrySetAction.rescan: - return context.l10n.collectionActionRescan; case EntrySetAction.toggleFavourite: // different data depending on toggle state return context.l10n.entryActionAddFavourite; @@ -147,6 +148,8 @@ extension ExtraEntrySetAction on EntrySetAction { return AIcons.map; case EntrySetAction.stats: return AIcons.stats; + case EntrySetAction.rescan: + return AIcons.refresh; // selecting case EntrySetAction.share: return AIcons.share; @@ -156,8 +159,6 @@ extension ExtraEntrySetAction on EntrySetAction { return AIcons.copy; case EntrySetAction.move: return AIcons.move; - case EntrySetAction.rescan: - return AIcons.refresh; case EntrySetAction.toggleFavourite: // different data depending on toggle state return AIcons.favourite; diff --git a/lib/widgets/collection/app_bar.dart b/lib/widgets/collection/app_bar.dart index 7d0589010..7ba7144ff 100644 --- a/lib/widgets/collection/app_bar.dart +++ b/lib/widgets/collection/app_bar.dart @@ -429,12 +429,12 @@ class _CollectionAppBarState extends State with SingleTickerPr // browsing or selecting case EntrySetAction.map: case EntrySetAction.stats: + case EntrySetAction.rescan: // selecting case EntrySetAction.share: case EntrySetAction.delete: case EntrySetAction.copy: case EntrySetAction.move: - case EntrySetAction.rescan: case EntrySetAction.toggleFavourite: case EntrySetAction.rotateCCW: case EntrySetAction.rotateCW: diff --git a/lib/widgets/collection/entry_set_action_delegate.dart b/lib/widgets/collection/entry_set_action_delegate.dart index 03a14e5bc..db0e0d242 100644 --- a/lib/widgets/collection/entry_set_action_delegate.dart +++ b/lib/widgets/collection/entry_set_action_delegate.dart @@ -67,13 +67,13 @@ class EntrySetActionDelegate with EntryEditorMixin, FeedbackMixin, PermissionAwa // browsing or selecting case EntrySetAction.map: case EntrySetAction.stats: + case EntrySetAction.rescan: return appMode == AppMode.main; // selecting case EntrySetAction.share: case EntrySetAction.delete: case EntrySetAction.copy: case EntrySetAction.move: - case EntrySetAction.rescan: case EntrySetAction.toggleFavourite: case EntrySetAction.rotateCCW: case EntrySetAction.rotateCW: @@ -111,13 +111,13 @@ class EntrySetActionDelegate with EntryEditorMixin, FeedbackMixin, PermissionAwa return true; case EntrySetAction.map: case EntrySetAction.stats: + case EntrySetAction.rescan: return (!isSelecting && hasItems) || (isSelecting && hasSelection); // selecting case EntrySetAction.share: case EntrySetAction.delete: case EntrySetAction.copy: case EntrySetAction.move: - case EntrySetAction.rescan: case EntrySetAction.toggleFavourite: case EntrySetAction.rotateCCW: case EntrySetAction.rotateCW: @@ -156,6 +156,9 @@ class EntrySetActionDelegate with EntryEditorMixin, FeedbackMixin, PermissionAwa case EntrySetAction.stats: _goToStats(context); break; + case EntrySetAction.rescan: + _rescan(context); + break; // selecting case EntrySetAction.share: _share(context); @@ -169,9 +172,6 @@ class EntrySetActionDelegate with EntryEditorMixin, FeedbackMixin, PermissionAwa case EntrySetAction.move: _move(context, moveType: MoveType.move); break; - case EntrySetAction.rescan: - _rescan(context); - break; case EntrySetAction.toggleFavourite: _toggleFavourite(context); break; @@ -215,12 +215,12 @@ class EntrySetActionDelegate with EntryEditorMixin, FeedbackMixin, PermissionAwa } void _rescan(BuildContext context) { - final source = context.read(); final selection = context.read>(); - final selectedItems = _getExpandedSelectedItems(selection); + final collection = context.read(); + final entries = (selection.isSelecting ? _getExpandedSelectedItems(selection) : collection.sortedEntries.toSet()); final controller = AnalysisController(canStartService: true, force: true); - source.analyze(controller, entries: selectedItems); + collection.source.analyze(controller, entries: entries); selection.browse(); }