Skip to content

Commit b4179d7

Browse files
committed
store [nfc]: Move queueId to PerAccountStoreBase
1 parent 8b73793 commit b4179d7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/model/store.dart

+4-5
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,10 @@ class AccountNotFoundException implements Exception {}
329329

330330
/// A bundle of items that are useful to [PerAccountStore] and its substores.
331331
class CorePerAccountStore {
332-
CorePerAccountStore({required this.connection});
332+
CorePerAccountStore({required this.connection, required this.queueId});
333333

334334
final ApiConnection connection; // TODO(#135): update zulipFeatureLevel with events
335+
final String queueId;
335336
}
336337

337338
/// A base class for [PerAccountStore] and its substores,
@@ -343,6 +344,7 @@ abstract class PerAccountStoreBase {
343344
final CorePerAccountStore _core;
344345

345346
ApiConnection get connection => _core.connection;
347+
String get queueId => _core.queueId;
346348
}
347349

348350
/// Store for the user's data for a given Zulip account.
@@ -386,12 +388,11 @@ class PerAccountStore extends PerAccountStoreBase with ChangeNotifier, EmojiStor
386388
}
387389

388390
final realmUrl = account.realmUrl;
389-
final core = CorePerAccountStore(connection: connection);
391+
final core = CorePerAccountStore(connection: connection, queueId: queueId);
390392
final channels = ChannelStoreImpl(initialSnapshot: initialSnapshot);
391393
return PerAccountStore._(
392394
globalStore: globalStore,
393395
core: core,
394-
queueId: queueId,
395396
realmUrl: realmUrl,
396397
realmWildcardMentionPolicy: initialSnapshot.realmWildcardMentionPolicy,
397398
realmMandatoryTopics: initialSnapshot.realmMandatoryTopics,
@@ -435,7 +436,6 @@ class PerAccountStore extends PerAccountStoreBase with ChangeNotifier, EmojiStor
435436
PerAccountStore._({
436437
required GlobalStore globalStore,
437438
required super.core,
438-
required this.queueId,
439439
required this.realmUrl,
440440
required this.realmWildcardMentionPolicy,
441441
required this.realmMandatoryTopics,
@@ -474,7 +474,6 @@ class PerAccountStore extends PerAccountStoreBase with ChangeNotifier, EmojiStor
474474

475475
final GlobalStore _globalStore;
476476

477-
final String queueId;
478477
UpdateMachine? get updateMachine => _updateMachine;
479478
UpdateMachine? _updateMachine;
480479
set updateMachine(UpdateMachine? value) {

0 commit comments

Comments
 (0)