#453 tag editor: tapping on applied tag applies it to all items

This commit is contained in:
Thibault Deckers 2023-01-07 12:11:23 +01:00
parent b0f613db27
commit f60e171e71
3 changed files with 10 additions and 2 deletions

View file

@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
### Changed
- editing description writes XMP `dc:description`, and clears Exif `ImageDescription` / `UserComment`
- in the tag editor, tapping on applied tag applies it to all items instead of removing it
### Fixed

View file

@ -280,7 +280,7 @@ class _CollectionSectionedContentState extends State<_CollectionSectionedContent
child: scrollView,
);
final selector = GridSelectionGestureDetector(
final selector = GridSelectionGestureDetector<AvesEntry>(
scrollableKey: _scrollableKey,
selectable: widget.selectable,
items: collection.sortedEntries,

View file

@ -157,7 +157,14 @@ class _TagEditorPageState extends State<TagEditorPage> {
)
: null,
onTap: (filter) {
// TODO TLAD [#453]
if (tagsByEntry.keys.length > 1) {
// for multiple entries, set tag for all of them
tagsByEntry.forEach((entry, filters) => filters.add(filter));
setState(() {});
} else {
// for single entry, remove tag (like pressing on the remove icon)
_removeTag(filter);
}
},
onRemove: _removeTag,
onLongPress: null,