Skip to content

Commit

Permalink
Fix logic for inport and output button label
Browse files Browse the repository at this point in the history
  • Loading branch information
AbandonedCart committed Sep 21, 2024
1 parent 6478ebc commit 49caa8e
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,18 +309,20 @@ class TagDataEditor : AppCompatActivity() {
}
}
appDataTransfer = findViewById<AppCompatButton>(R.id.transfer_app_data).apply {
text = getString(R.string.import_app_data)
text = getString(
if (null != AppData.transferData) R.string.import_app_data else R.string.export_app_data
)
setOnClickListener {
val button = it as AppCompatButton
if (null != AppData.transferData) {
transferData()
val button = it as AppCompatButton
button.text = getString(R.string.export_app_data)
button.isEnabled = false
} else {
AppData.apply {
transferId = amiiboData.appId
transferData = amiiboData.appData
}
button.text = getString(R.string.import_app_data)
finish()
}
}
Expand Down

0 comments on commit 49caa8e

Please sign in to comment.