@@ -308,7 +308,6 @@ class PerAccountStore extends ChangeNotifier with EmojiStore, UserStore, Channel
308
308
emoji: EmojiStoreImpl (
309
309
realmUrl: realmUrl, allRealmEmoji: initialSnapshot.realmEmoji),
310
310
accountId: accountId,
311
- selfUserId: account.userId,
312
311
userSettings: initialSnapshot.userSettings,
313
312
typingNotifier: TypingNotifier (
314
313
connection: connection,
@@ -317,7 +316,9 @@ class PerAccountStore extends ChangeNotifier with EmojiStore, UserStore, Channel
317
316
typingStartedWaitPeriod: Duration (
318
317
milliseconds: initialSnapshot.serverTypingStartedWaitPeriodMilliseconds),
319
318
),
320
- users: UserStoreImpl (initialSnapshot: initialSnapshot),
319
+ users: UserStoreImpl (
320
+ selfUserId: account.userId,
321
+ initialSnapshot: initialSnapshot),
321
322
typingStatus: TypingStatus (
322
323
selfUserId: account.userId,
323
324
typingStartedExpiryPeriod: Duration (milliseconds: initialSnapshot.serverTypingStartedExpiryPeriodMilliseconds),
@@ -348,7 +349,6 @@ class PerAccountStore extends ChangeNotifier with EmojiStore, UserStore, Channel
348
349
required this .emailAddressVisibility,
349
350
required EmojiStoreImpl emoji,
350
351
required this .accountId,
351
- required this .selfUserId,
352
352
required this .userSettings,
353
353
required this .typingNotifier,
354
354
required UserStoreImpl users,
@@ -358,8 +358,7 @@ class PerAccountStore extends ChangeNotifier with EmojiStore, UserStore, Channel
358
358
required this .unreads,
359
359
required this .recentDmConversationsView,
360
360
required this .recentSenders,
361
- }) : assert (selfUserId == globalStore.getAccount (accountId)! .userId),
362
- assert (realmUrl == globalStore.getAccount (accountId)! .realmUrl),
361
+ }) : assert (realmUrl == globalStore.getAccount (accountId)! .realmUrl),
363
362
assert (realmUrl == connection.realmUrl),
364
363
assert (emoji.realmUrl == realmUrl),
365
364
_globalStore = globalStore,
@@ -457,16 +456,16 @@ class PerAccountStore extends ChangeNotifier with EmojiStore, UserStore, Channel
457
456
/// Will throw if called after [dispose] has been called.
458
457
Account get account => _globalStore.getAccount (accountId)! ;
459
458
460
- /// Always equal to `account.userId` .
461
- final int selfUserId;
462
-
463
459
final UserSettings ? userSettings; // TODO(server-5)
464
460
465
461
final TypingNotifier typingNotifier;
466
462
467
463
////////////////////////////////
468
464
// Users and data about them.
469
465
466
+ @override
467
+ int get selfUserId => _users.selfUserId;
468
+
470
469
@override
471
470
Map <int , User > get users => _users.users;
472
471
0 commit comments