From 3f3645b8e4b463d1901fca5fe1cd11e3196a02b9 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sun, 23 Oct 2022 16:15:19 +0200 Subject: [PATCH] neon: Fix user details and user status bloc caching --- packages/neon/lib/src/blocs/accounts.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/neon/lib/src/blocs/accounts.dart b/packages/neon/lib/src/blocs/accounts.dart index 8a13c0e5..e6780b4e 100644 --- a/packages/neon/lib/src/blocs/accounts.dart +++ b/packages/neon/lib/src/blocs/accounts.dart @@ -139,8 +139,8 @@ class AccountsBloc extends $AccountsBloc { } UserDetailsBloc getUserDetailsBloc(final Account account) { - if (_userDetailsBlocs[account] != null) { - return _userDetailsBlocs[account]!; + if (_userDetailsBlocs[account.id] != null) { + return _userDetailsBlocs[account.id]!; } return _userDetailsBlocs[account.id] = UserDetailsBloc( @@ -150,8 +150,8 @@ class AccountsBloc extends $AccountsBloc { } UserStatusBloc getUserStatusBloc(final Account account) { - if (_userStatusBlocs[account] != null) { - return _userStatusBlocs[account]!; + if (_userStatusBlocs[account.id] != null) { + return _userStatusBlocs[account.id]!; } return _userStatusBlocs[account.id] = UserStatusBloc(