Viewer: prevent tag navigation

This commit is contained in:
Thibault Deckers 2020-03-19 18:40:40 +09:00
parent d04f5da41d
commit 14cf1b3edf
2 changed files with 7 additions and 2 deletions

View file

@ -39,9 +39,13 @@ class CollectionLens with ChangeNotifier {
}
factory CollectionLens.from(CollectionLens lens, CollectionFilter filter) {
if (lens == null) return null;
return CollectionLens(
source: lens.source,
filters: [...lens.filters, filter],
filters: [
...lens.filters,
if (filter != null) filter,
],
groupFactor: lens.groupFactor,
sortFactor: lens.sortFactor,
);

View file

@ -24,7 +24,7 @@ class XmpTagSectionSliver extends AnimatedWidget {
tags.isEmpty
? []
: [
const SectionRow('XMP Tags'),
const SectionRow('Tags'),
Padding(
padding: const EdgeInsets.symmetric(horizontal: TagButton.buttonBorderWidth / 2),
child: Wrap(
@ -43,6 +43,7 @@ class XmpTagSectionSliver extends AnimatedWidget {
}
void _goToTag(BuildContext context, String tag) {
if (collection == null) return;
Navigator.push(
context,
MaterialPageRoute(