diff --git a/lib/bloc/list_sharing.dart b/lib/bloc/list_sharing.dart index f60a3144..6ac00c38 100644 --- a/lib/bloc/list_sharing.dart +++ b/lib/bloc/list_sharing.dart @@ -201,11 +201,13 @@ class ListSharingBloc extends Bloc { } void _onShareRemovedEvent(ShareRemovedEvent ev) { - _refreshThrottler.trigger( - maxResponceTime: const Duration(seconds: 3), - maxPendingCount: 10, - data: ev.share, - ); + if (_isAccountOfInterest(ev.account)) { + _refreshThrottler.trigger( + maxResponceTime: const Duration(seconds: 3), + maxPendingCount: 10, + data: ev.share, + ); + } } Future> _query(ListSharingBlocQuery ev) async { @@ -342,6 +344,9 @@ class ListSharingBloc extends Bloc { } } + bool _isAccountOfInterest(Account account) => + state.account == null || state.account!.compareServerIdentity(account); + late final _shareRemovedListener = AppEventListener(_onShareRemovedEvent);