Viewer: prevent tag navigation
This commit is contained in:
parent
d04f5da41d
commit
14cf1b3edf
2 changed files with 7 additions and 2 deletions
|
@ -39,9 +39,13 @@ class CollectionLens with ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
factory CollectionLens.from(CollectionLens lens, CollectionFilter filter) {
|
factory CollectionLens.from(CollectionLens lens, CollectionFilter filter) {
|
||||||
|
if (lens == null) return null;
|
||||||
return CollectionLens(
|
return CollectionLens(
|
||||||
source: lens.source,
|
source: lens.source,
|
||||||
filters: [...lens.filters, filter],
|
filters: [
|
||||||
|
...lens.filters,
|
||||||
|
if (filter != null) filter,
|
||||||
|
],
|
||||||
groupFactor: lens.groupFactor,
|
groupFactor: lens.groupFactor,
|
||||||
sortFactor: lens.sortFactor,
|
sortFactor: lens.sortFactor,
|
||||||
);
|
);
|
||||||
|
|
|
@ -24,7 +24,7 @@ class XmpTagSectionSliver extends AnimatedWidget {
|
||||||
tags.isEmpty
|
tags.isEmpty
|
||||||
? []
|
? []
|
||||||
: [
|
: [
|
||||||
const SectionRow('XMP Tags'),
|
const SectionRow('Tags'),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: TagButton.buttonBorderWidth / 2),
|
padding: const EdgeInsets.symmetric(horizontal: TagButton.buttonBorderWidth / 2),
|
||||||
child: Wrap(
|
child: Wrap(
|
||||||
|
@ -43,6 +43,7 @@ class XmpTagSectionSliver extends AnimatedWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
void _goToTag(BuildContext context, String tag) {
|
void _goToTag(BuildContext context, String tag) {
|
||||||
|
if (collection == null) return;
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
|
|
Loading…
Reference in a new issue