Add keepAlive calls in Synching and SyncServer build methods

This commit is contained in:
Moustapha Kodjo Amadou 2025-11-08 22:04:57 +01:00
parent c649525145
commit d35192629b
2 changed files with 4 additions and 1 deletions

View file

@ -12,6 +12,7 @@ part 'sync_providers.g.dart';
class Synching extends _$Synching {
@override
SyncPreference build({required int? syncId}) {
ref.keepAlive();
return isar.syncPreferences.getSync(syncId!) ?? SyncPreference(syncId: 1);
}

View file

@ -33,7 +33,9 @@ class SyncServer extends _$SyncServer {
final String _syncSettingsUrl = '/sync/settings';
@override
void build({required int syncId}) {}
void build({required int syncId}) {
ref.keepAlive();
}
Future<(bool, String)> login(
AppLocalizations l10n,