Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7f1838c authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

AM: Fix sync always pending on Android 14+

parent 96910f08
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -232,11 +232,11 @@ class SyncFrameworkIntegration @Inject constructor(
            val listener = ContentResolver.addStatusChangeListener(
                ContentResolver.SYNC_OBSERVER_TYPE_PENDING
            ) {
                trySend(anyPendingSync(accounts, authority))
                runCatching { trySend(anyPendingSync(accounts, authority)) }
            }

            // Emit initial value
            trySend(anyPendingSync(accounts, authority))
            runCatching { trySend(anyPendingSync(accounts, authority)) }

            // Clean up listener on close
            awaitClose { ContentResolver.removeStatusChangeListener(listener) }