widgets looking ok
This commit is contained in:
@@ -206,10 +206,20 @@ class SyncController extends ChangeNotifier {
|
||||
|
||||
/// Bank pull-to-refresh / reconnect finished — reconcile with PocketBase.
|
||||
///
|
||||
/// Always runs a full sync when logged in so (1) new API txs are pushed and
|
||||
/// Runs a full sync when idle so (1) new API txs are pushed and
|
||||
/// (2) any cloud-only history the bank window lacks is pulled back.
|
||||
///
|
||||
/// If a sync is already in flight (common at cold start: constructor sync
|
||||
/// overlaps bank refresh), do **not** queue another full sync — that was
|
||||
/// causing a back-to-back double pull of 4k+ txs.
|
||||
void _onBankDataLoaded() {
|
||||
if (!_auth.isLoggedIn) return;
|
||||
if (_syncing) {
|
||||
debugPrint(
|
||||
'SyncController: bank load finished during sync — skip queued full sync',
|
||||
);
|
||||
return;
|
||||
}
|
||||
unawaited(syncNow());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user