File tree 3 files changed +11
-4
lines changed 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,14 @@ abstract class GlobalStore extends ChangeNotifier {
144
144
/// This method should be called only by the implementation of [perAccount] .
145
145
/// Other callers interested in per-account data should use [perAccount]
146
146
/// and/or [perAccountSync] .
147
- Future <PerAccountStore > loadPerAccount (int accountId);
147
+ Future <PerAccountStore > loadPerAccount (int accountId) {
148
+ return doLoadPerAccount (accountId);
149
+ }
150
+
151
+ /// Load per-account data for the given account, unconditionally.
152
+ ///
153
+ /// This method should be called only by [loadPerAccount] .
154
+ Future <PerAccountStore > doLoadPerAccount (int accountId);
148
155
149
156
// Just the Iterables, not the actual Map, to avoid clients mutating the map.
150
157
// Mutations should go through the setters/mutators below.
@@ -682,7 +689,7 @@ class LiveGlobalStore extends GlobalStore {
682
689
final AppDatabase _db;
683
690
684
691
@override
685
- Future <PerAccountStore > loadPerAccount (int accountId) async {
692
+ Future <PerAccountStore > doLoadPerAccount (int accountId) async {
686
693
final updateMachine = await UpdateMachine .load (this , accountId);
687
694
return updateMachine.store;
688
695
}
Original file line number Diff line number Diff line change @@ -670,7 +670,7 @@ class LoadingTestGlobalStore extends TestGlobalStore {
670
670
Map <int , List <Completer <PerAccountStore >>> completers = {};
671
671
672
672
@override
673
- Future <PerAccountStore > loadPerAccount (int accountId) {
673
+ Future <PerAccountStore > doLoadPerAccount (int accountId) {
674
674
final completer = Completer <PerAccountStore >();
675
675
(completers[accountId] ?? = []).add (completer);
676
676
return completer.future;
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ class TestGlobalStore extends GlobalStore {
107
107
}
108
108
109
109
@override
110
- Future <PerAccountStore > loadPerAccount (int accountId) {
110
+ Future <PerAccountStore > doLoadPerAccount (int accountId) {
111
111
final initialSnapshot = _initialSnapshots[accountId]! ;
112
112
final store = PerAccountStore .fromInitialSnapshot (
113
113
globalStore: this ,
You can’t perform that action at this time.
0 commit comments