do the easy check first at pressing Back at event details

This commit is contained in:
tibbi 2021-04-14 19:38:44 +02:00
parent ee40301181
commit a2da4a3503

View File

@ -307,7 +307,7 @@ class EventActivity : SimpleActivity() {
} }
override fun onBackPressed() { override fun onBackPressed() {
if (isEventChanged() && System.currentTimeMillis() - mLastSavePromptTS > SAVE_DISCARD_PROMPT_INTERVAL) { if (System.currentTimeMillis() - mLastSavePromptTS > SAVE_DISCARD_PROMPT_INTERVAL && isEventChanged()) {
mLastSavePromptTS = System.currentTimeMillis() mLastSavePromptTS = System.currentTimeMillis()
ConfirmationAdvancedDialog(this, "", R.string.save_before_closing, R.string.save, R.string.discard) { ConfirmationAdvancedDialog(this, "", R.string.save_before_closing, R.string.save, R.string.discard) {
if (it) { if (it) {