fix #706, open specific event details from List view when clicked directly

This commit is contained in:
tibbi 2018-12-03 16:58:59 +01:00
parent b156fae9ff
commit dbdd1b5b5a
2 changed files with 4 additions and 4 deletions

View file

@ -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)

View file

@ -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))