mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
exit the app when opening a notification to an invalid event
This commit is contained in:
@@ -48,6 +48,12 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
|
|||||||
|
|
||||||
val eventId = intent.getIntExtra(EVENT_ID, 0)
|
val eventId = intent.getIntExtra(EVENT_ID, 0)
|
||||||
val event = dbHelper.getEvent(eventId)
|
val event = dbHelper.getEvent(eventId)
|
||||||
|
|
||||||
|
if (eventId != 0 && event == null) {
|
||||||
|
finish()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (event != null) {
|
if (event != null) {
|
||||||
mEvent = event
|
mEvent = event
|
||||||
mEventOccurrenceTS = intent.getIntExtra(EVENT_OCCURRENCE_TS, 0)
|
mEventOccurrenceTS = intent.getIntExtra(EVENT_OCCURRENCE_TS, 0)
|
||||||
|
Reference in New Issue
Block a user