Use existing `getActivityToOpen` function

This commit is contained in:
Naveen 2022-06-29 11:10:08 +05:30
parent e6d20b93d5
commit ab736415cd
1 changed files with 1 additions and 1 deletions

View File

@ -342,7 +342,7 @@ fun Context.getNotification(pendingIntent: PendingIntent, event: Event, content:
private fun getFormattedEventTime(startTime: String, endTime: String) = if (startTime == endTime) startTime else "$startTime \u2013 $endTime" private fun getFormattedEventTime(startTime: String, endTime: String) = if (startTime == endTime) startTime else "$startTime \u2013 $endTime"
private fun getPendingIntent(context: Context, event: Event): PendingIntent { private fun getPendingIntent(context: Context, event: Event): PendingIntent {
val activityClass = if (event.isTask()) TaskActivity::class.java else EventActivity::class.java val activityClass = getActivityToOpen(event.isTask())
val intent = Intent(context, activityClass) val intent = Intent(context, activityClass)
intent.putExtra(EVENT_ID, event.id) intent.putExtra(EVENT_ID, event.id)
intent.putExtra(EVENT_OCCURRENCE_TS, event.startTS) intent.putExtra(EVENT_OCCURRENCE_TS, event.startTS)