|
|
@ -77,6 +77,7 @@ class SyncManager @Inject constructor(
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
pull()
|
|
|
|
pull()
|
|
|
|
push()
|
|
|
|
push()
|
|
|
|
|
|
|
|
Log.i("SyncManager", "Sync finished successfully.")
|
|
|
|
} catch (e: ConnectionLostException) {
|
|
|
|
} catch (e: ConnectionLostException) {
|
|
|
|
Log.i("SyncManager", "Network unavailable. Aborting sync.")
|
|
|
|
Log.i("SyncManager", "Network unavailable. Aborting sync.")
|
|
|
|
} catch (e: ServiceUnavailable) {
|
|
|
|
} catch (e: ServiceUnavailable) {
|
|
|
@ -85,8 +86,6 @@ class SyncManager @Inject constructor(
|
|
|
|
Log.e("SyncManager", "Unexpected sync exception. Disabling sync.", e)
|
|
|
|
Log.e("SyncManager", "Unexpected sync exception. Disabling sync.", e)
|
|
|
|
preferences.disableSync()
|
|
|
|
preferences.disableSync()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Log.i("SyncManager", "Sync finished successfully.")
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private suspend fun push(depth: Int = 0) {
|
|
|
|
private suspend fun push(depth: Int = 0) {
|
|
|
|