From 104373a18614107168c65ea31a19799c2343b1a0 Mon Sep 17 00:00:00 2001 From: Thibault Deckers Date: Wed, 3 Feb 2021 11:57:26 +0900 Subject: [PATCH] shortcut: fixed opening app with location filter --- lib/model/source/collection_lens.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/model/source/collection_lens.dart b/lib/model/source/collection_lens.dart index b65e64934..68275752a 100644 --- a/lib/model/source/collection_lens.dart +++ b/lib/model/source/collection_lens.dart @@ -4,7 +4,9 @@ import 'dart:collection'; import 'package:aves/model/entry.dart'; import 'package:aves/model/filters/album.dart'; import 'package:aves/model/filters/filters.dart'; +import 'package:aves/model/filters/location.dart'; import 'package:aves/model/source/collection_source.dart'; +import 'package:aves/model/source/location.dart'; import 'package:aves/model/source/section_keys.dart'; import 'package:aves/model/source/tag.dart'; import 'package:aves/utils/change_notifier.dart'; @@ -40,6 +42,11 @@ class CollectionLens with ChangeNotifier, CollectionActivityMixin, CollectionSel _subscriptions.add(source.eventBus.on().listen((e) => onEntryRemoved(e.entries))); _subscriptions.add(source.eventBus.on().listen((e) => _refresh())); _subscriptions.add(source.eventBus.on().listen((e) => _refresh())); + _subscriptions.add(source.eventBus.on().listen((e) { + if (filters.any((filter) => filter is LocationFilter)) { + _refresh(); + } + })); } _refresh(); }