fix: fixed sync status showing
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user