Skip to content

Commit a461c0b

Browse files
committed
store [nfc]: Move queueId to PerAccountStoreBase
1 parent 313f8a9 commit a461c0b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/model/store.dart

+5-3
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,15 @@ class CorePerAccountStore {
338338
CorePerAccountStore._({
339339
required GlobalStore globalStore,
340340
required this.connection,
341+
required this.queueId,
341342
required this.accountId,
342343
required this.selfUserId,
343344
}) : _globalStore = globalStore,
344345
assert(connection.realmUrl == globalStore.getAccount(accountId)!.realmUrl);
345346

346347
final GlobalStore _globalStore;
347348
final ApiConnection connection; // TODO(#135): update zulipFeatureLevel with events
349+
final String queueId;
348350
final int accountId;
349351

350352
// This isn't strictly needed as a field; it could be a getter
@@ -384,6 +386,8 @@ abstract class PerAccountStoreBase {
384386
////////////////////////////////
385387
// Data attached to the self-account on the realm.
386388

389+
String get queueId => _core.queueId;
390+
387391
int get accountId => _core.accountId;
388392

389393
/// The [Account] this store belongs to.
@@ -456,13 +460,13 @@ class PerAccountStore extends PerAccountStoreBase with ChangeNotifier, EmojiStor
456460
final core = CorePerAccountStore._(
457461
globalStore: globalStore,
458462
connection: connection,
463+
queueId: queueId,
459464
accountId: accountId,
460465
selfUserId: account.userId,
461466
);
462467
final channels = ChannelStoreImpl(initialSnapshot: initialSnapshot);
463468
return PerAccountStore._(
464469
core: core,
465-
queueId: queueId,
466470
realmWildcardMentionPolicy: initialSnapshot.realmWildcardMentionPolicy,
467471
realmMandatoryTopics: initialSnapshot.realmMandatoryTopics,
468472
realmWaitingPeriodThreshold: initialSnapshot.realmWaitingPeriodThreshold,
@@ -500,7 +504,6 @@ class PerAccountStore extends PerAccountStoreBase with ChangeNotifier, EmojiStor
500504

501505
PerAccountStore._({
502506
required super.core,
503-
required this.queueId,
504507
required this.realmWildcardMentionPolicy,
505508
required this.realmMandatoryTopics,
506509
required this.realmWaitingPeriodThreshold,
@@ -531,7 +534,6 @@ class PerAccountStore extends PerAccountStoreBase with ChangeNotifier, EmojiStor
531534
////////////////////////////////
532535
// Where data comes from in the first place.
533536

534-
final String queueId;
535537
UpdateMachine? get updateMachine => _updateMachine;
536538
UpdateMachine? _updateMachine;
537539
set updateMachine(UpdateMachine? value) {

0 commit comments

Comments
 (0)