fix #1340, do not show the save/discard dialog if really nothing changed

This commit is contained in:
tibbi 2021-04-14 20:29:05 +02:00
parent a2da4a3503
commit 9ce553c89f

View File

@ -84,6 +84,7 @@ class EventActivity : SimpleActivity() {
private var mEventCalendarId = STORED_LOCALLY_ONLY private var mEventCalendarId = STORED_LOCALLY_ONLY
private var mWasActivityInitialized = false private var mWasActivityInitialized = false
private var mWasContactsPermissionChecked = false private var mWasContactsPermissionChecked = false
private var mWasCalendarChanged = false
private var mAttendees = ArrayList<Attendee>() private var mAttendees = ArrayList<Attendee>()
private var mAttendeeAutoCompleteViews = ArrayList<MyAutoCompleteTextView>() private var mAttendeeAutoCompleteViews = ArrayList<MyAutoCompleteTextView>()
private var mAvailableContacts = ArrayList<Attendee>() private var mAvailableContacts = ArrayList<Attendee>()
@ -298,7 +299,7 @@ class EventActivity : SimpleActivity() {
mRepeatInterval != mEvent.repeatInterval || mRepeatInterval != mEvent.repeatInterval ||
mRepeatRule != mEvent.repeatRule || mRepeatRule != mEvent.repeatRule ||
mEventTypeId != mEvent.eventType || mEventTypeId != mEvent.eventType ||
mEventCalendarId != mEvent.getCalDAVCalendarId() || mWasCalendarChanged ||
hasTimeChanged) { hasTimeChanged) {
return true return true
} }
@ -881,6 +882,7 @@ class EventActivity : SimpleActivity() {
mEventTypeId = config.lastUsedLocalEventTypeId mEventTypeId = config.lastUsedLocalEventTypeId
updateEventType() updateEventType()
} }
mWasCalendarChanged = true
mEventCalendarId = it mEventCalendarId = it
config.lastUsedCaldavCalendarId = it config.lastUsedCaldavCalendarId = it
updateCurrentCalendarInfo(getCalendarWithId(calendars, it)) updateCurrentCalendarInfo(getCalendarWithId(calendars, it))