Skip to content

Commit

Permalink
feat: background sync even if interval not passed
Browse files Browse the repository at this point in the history
this avoids the scenario of:
1. study some cards
2. leave the app within a time less than 10 minutes (so autosync isn't triggered)
3. open the app again and have the wait the studied cards in `1.` to be synced, although they could have been already synced in the background
  • Loading branch information
BrayanDSO committed Apr 17, 2024
1 parent 12cf800 commit 2145764
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ open class DeckPicker :
!isAutoSyncEnabled -> Timber.d("autoSync: not enabled")
isBlockedByMeteredConnection -> Timber.d("autoSync: blocked by metered connection")
!NetworkUtils.isOnline -> Timber.d("autoSync: offline")
!syncIntervalPassed() -> Timber.d("autoSync: sync interval not passed")
!runInBackground && !syncIntervalPassed() -> Timber.d("autoSync: interval not passed")
!isLoggedIn() -> Timber.d("autoSync: not logged in")
mediaMigrationIsInProgress(this) -> Timber.d("autoSync: migrating storage")
!areThereChangesToSync() -> {
Expand Down

0 comments on commit 2145764

Please sign in to comment.