Skip to content

Commit 8d06844

Browse files
Fix sync with 0.63
1 parent 88e608a commit 8d06844

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ android {
1111
minSdkVersion 26
1212
compileSdk 35
1313
targetSdkVersion 35
14-
versionCode 4
15-
versionName "0.90.12-alpha2.1"
14+
versionCode 5
15+
versionName "0.90.12-alpha2.2"
1616

1717
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1818

app/src/main/kotlin/eu/fliegendewurst/triliumdroid/ConnectionUtil.kt

+7-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,13 @@ object ConnectionUtil {
195195
Log.e(TAG, "login received response $resp")
196196
try {
197197
val json = JSONObject(resp)
198-
callbackError(IllegalStateException(json.getString("message")))
198+
val msg = json.getString("message")
199+
if (msg.startsWith("Non-matching sync versions, local is version 32, remote is 33.")) {
200+
prefs?.edit()?.putInt("syncVersion", Cache.CacheDbHelper.SYNC_VERSION_0_63_3)?.apply()
201+
connect(server, callback, callbackError)
202+
return
203+
}
204+
callbackError(IllegalStateException())
199205
return
200206
} catch (_: Exception) {
201207
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed sync with Trilium 0.63.

0 commit comments

Comments
 (0)