replaced account data singleton with a session model
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import '../model/account_data.dart';
|
||||
import '../session/session_manager.dart';
|
||||
|
||||
/// Joins concurrent calls into the one already running for the same account
|
||||
/// session. A run left over from a signed-out session never blocks the next
|
||||
@@ -8,7 +8,7 @@ class SessionSingleFlight {
|
||||
int? _epoch;
|
||||
|
||||
Future<void> run(Future<void> Function() action) {
|
||||
final epoch = AccountData().sessionEpoch;
|
||||
final epoch = SessionManager().sessionEpoch;
|
||||
final running = _running;
|
||||
if (running != null && _epoch == epoch) return running;
|
||||
_epoch = epoch;
|
||||
|
||||
Reference in New Issue
Block a user