Skip to content

Commit

Permalink
fix(main): hide popup update when user click no thanks.
Browse files Browse the repository at this point in the history
  • Loading branch information
anangkur committed Apr 19, 2020
1 parent 4a9e398 commit 8414735
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,15 @@ class MainActivity: BaseActivity<ViewModel>(), MainActionListener, ForceUpdateCh

override fun onUpdateNeeded(updateUrl: String?) {
val dialog: AlertDialog = AlertDialog.Builder(this)
.setTitle("New version available")
.setMessage("Please, update app to new version to continue reposting.")
.setPositiveButton("Update") { dialog, which -> redirectStore(updateUrl) }
.setNegativeButton("No, thanks") { dialog, which -> finish() }
.setTitle(getString(R.string.message_new_version_available))
.setMessage(getString(R.string.message_please_update))
.setPositiveButton(getString(R.string.btn_update)) { dialog, which ->
dialog.dismiss()
redirectStore(updateUrl)
}
.setNegativeButton(getString(R.string.btn_no_thanks)) { dialog, which ->
dialog.dismiss()
}
.create()
dialog.show()
}
Expand Down

0 comments on commit 8414735

Please sign in to comment.