mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2024-12-17 19:18:26 +01:00
do the easy check first at pressing Back at event details
This commit is contained in:
parent
ee40301181
commit
a2da4a3503
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user