fix: clean up sync state tracking in offline sync service

- Remove duplicate state tracking from service
- State transition detection now fully handled by hook
- Fix remaining syncState reference bug
- Simplify sync lock mechanism
This commit is contained in:
Gigi
2025-10-09 13:38:23 +01:00
parent 450776f9d0
commit 3330f22f82
2 changed files with 10 additions and 39 deletions

View File

@@ -48,7 +48,7 @@ export function useOfflineSync({
if (wasLocalOnly && isNowOnline) {
console.log('✈️ Detected transition: Flight Mode → Online')
syncLocalEventsToRemote(relayPool, account, true)
syncLocalEventsToRemote(relayPool, account)
}
previousStateRef.current.hasRemoteRelays = hasRemoteRelays