From dbdd1b5b5a642fa747959ba00748692444a66af6 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 3 Dec 2018 16:58:59 +0100 Subject: [PATCH] fix #706, open specific event details from List view when clicked directly --- .../calendar/pro/activities/MainActivity.kt | 6 +++--- .../calendar/pro/activities/SplashActivity.kt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt index de46190d2..e01b35842 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt @@ -273,11 +273,11 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener { return true } - val eventIdToOpen = intent.getLongExtra(EVENT_ID, 0) - val eventOccurrenceToOpen = intent.getIntExtra(EVENT_OCCURRENCE_TS, 0) + val eventIdToOpen = intent.getLongExtra(EVENT_ID, 0L) + val eventOccurrenceToOpen = intent.getLongExtra(EVENT_OCCURRENCE_TS, 0L) intent.removeExtra(EVENT_ID) intent.removeExtra(EVENT_OCCURRENCE_TS) - if (eventIdToOpen != 0L && eventOccurrenceToOpen != 0) { + if (eventIdToOpen != 0L && eventOccurrenceToOpen != 0L) { Intent(this, EventActivity::class.java).apply { putExtra(EVENT_ID, eventIdToOpen) putExtra(EVENT_OCCURRENCE_TS, eventOccurrenceToOpen) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/SplashActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/SplashActivity.kt index 6e742d354..046cdfc1c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/SplashActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/SplashActivity.kt @@ -14,7 +14,7 @@ class SplashActivity : BaseSplashActivity() { } intent.extras?.containsKey(EVENT_ID) == true -> Intent(this, MainActivity::class.java).apply { putExtra(EVENT_ID, intent.getLongExtra(EVENT_ID, 0L)) - putExtra(EVENT_OCCURRENCE_TS, intent.getIntExtra(EVENT_OCCURRENCE_TS, 0)) + putExtra(EVENT_OCCURRENCE_TS, intent.getLongExtra(EVENT_OCCURRENCE_TS, 0L)) startActivity(this) } else -> startActivity(Intent(this, MainActivity::class.java))