mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-03-13 18:58:53 +01:00
Fix person controller not responding to provider change in pref
This commit is contained in:
parent
f848f612ea
commit
0af86944d0
1 changed files with 11 additions and 1 deletions
|
@ -32,9 +32,17 @@ class PersonsController {
|
|||
this._c, {
|
||||
required this.account,
|
||||
required this.accountPrefController,
|
||||
});
|
||||
}) {
|
||||
_subscriptions
|
||||
.add(accountPrefController.personProvider.distinct().listen((event) {
|
||||
reload();
|
||||
}));
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
for (final s in _subscriptions) {
|
||||
s.cancel();
|
||||
}
|
||||
_personStreamContorller.close();
|
||||
}
|
||||
|
||||
|
@ -83,6 +91,8 @@ class PersonsController {
|
|||
final Account account;
|
||||
final AccountPrefController accountPrefController;
|
||||
|
||||
final _subscriptions = <StreamSubscription>[];
|
||||
|
||||
var _isPersonStreamInited = false;
|
||||
final _personStreamContorller = BehaviorSubject.seeded(
|
||||
const PersonStreamEvent(data: [], hasNext: true),
|
||||
|
|
Loading…
Reference in a new issue