-
-
Notifications
You must be signed in to change notification settings - Fork 89
Update sync progress bar when pending in SAF #1445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main-ose
Are you sure you want to change the base?
Conversation
48e605c
to
6eaf0ef
Compare
6eaf0ef
to
bdc8e2e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the problem described here: #1422 (comment) As stated I would like to address it in a new PR, because it's not really related to this feature. Try testing on a clean emulator without tasks apps installed and it should work. |
Good thing, that it happens to you too though. Confirms the issue is not only on my side. :) I have created #1458 to track the problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were you using Android 16? It's working for me if I do the following: A14 or A15:
I have added Android 16 to the check and it works fine there too - but it takes a few seconds before the sync adapter framework initiates the sync :) |
c4842e4
to
ae42e69
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now works fine for me :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm… I wonder whether we should do the cancelSync thing. In theory we could also merge it and say it works for Android <14 (and hopefully soon again as soon as it's fixed in Android).
app/src/main/kotlin/at/bitfire/davdroid/sync/SyncAdapterServices.kt
Outdated
Show resolved
Hide resolved
8c89ba5
to
544a814
Compare
544a814
to
8c53814
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Can you please split it into 2 PRs:
- (this) one that addresses Pending sync not shown in some cases #1422 and just assumes that no account is pending on Android 14+
- (another) one that addresses [Sync framework] Sync always pending on A14+ #1458, introduces the
cancelSync
and the test method?
The reason is that I think the first one has more code, but is easier to merge.
For the second I'll have a more in-depth look / a few comments, but it's easier if the first one is already merged.
app/src/main/kotlin/at/bitfire/davdroid/ui/account/AccountProgressUseCase.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/at/bitfire/davdroid/sync/SyncFrameworkIntegration.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/at/bitfire/davdroid/sync/SyncFrameworkIntegration.kt
Outdated
Show resolved
Hide resolved
app/src/androidTest/kotlin/at/bitfire/davdroid/sync/SyncAdapterServicesTest.kt
Outdated
Show resolved
Hide resolved
app/src/androidTest/kotlin/at/bitfire/davdroid/sync/SyncAdapterServicesTest.kt
Outdated
Show resolved
Hide resolved
app/src/androidTest/kotlin/at/bitfire/davdroid/sync/SyncAdapterServicesTest.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/at/bitfire/davdroid/sync/SyncAdapterServices.kt
Outdated
Show resolved
Hide resolved
app/src/androidTest/kotlin/at/bitfire/davdroid/sync/SyncAdapterServicesTest.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/at/bitfire/davdroid/resource/LocalAddressBookStore.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/at/bitfire/davdroid/sync/SyncFrameworkIntegration.kt
Outdated
Show resolved
Hide resolved
…sync framework Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
…irectly Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
This reverts commit 8c53814.
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
b9a7cca
to
69c21ad
Compare
Purpose
After editing an event, task or contact in a local collection / content provider, their entries are marked as dirty and the sync framework can inform us about the pending sync status. We should listen for changes and show the state in DAVx5.
Short description
isSyncPending
flow which emits sync pending state for given account and authoritiesNote
For testing, note that sometimes pending syncs get stuck forever if (any?) tasks app is installed and synchronized. Try testing on a clean emulator without tasks apps installed and it should work.FixedNote 2
Changes in any calendar will show the calendar authority of all accounts as pending for sync, regardless of which is checked. This does not seem to be the case with contacts. Since it's SAF internal again, I am not sure whether/how this can be avoided.
Checklist