fix: fixed sync status showing

This commit is contained in:
2026-06-10 12:09:01 +03:00
parent ea4011e2ff
commit f9a1a70faf
2 changed files with 23 additions and 10 deletions
@@ -46,12 +46,12 @@ class MainActivity : AppCompatActivity() {
syncWithWearOSButton.setOnClickListener {
Toast.makeText(this, "Sync in progress...", Toast.LENGTH_SHORT).show()
val isSuccess = sendToWatch(this, "/updateCards", Json.encodeToString(db.getCards()))
if (isSuccess) {
Toast.makeText(this, "Synced!", Toast.LENGTH_SHORT).show()
} else {
Toast.makeText(this, "Sync failed! Please, check your connection", Toast.LENGTH_LONG).show()
sendToWatch(this, "/updateCards", Json.encodeToString(db.getCards())) { isSuccess ->
if (isSuccess) {
Toast.makeText(this, "Successfully synced!", Toast.LENGTH_SHORT).show()
} else {
Toast.makeText(this, "Sync failed! Please, check your connection", Toast.LENGTH_LONG).show()
}
}
}
}