diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Context.kt index 19affee1c..3e77e0caf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Context.kt @@ -184,14 +184,10 @@ fun Context.getNotification(pendingIntent: PendingIntent, event: Event, content: val soundUri = Uri.parse(config.reminderSoundUri) grantReadUriPermission(config.reminderSoundUri) - val contentTitle = when (publicVersion) { - false -> event.title - true -> resources.getString(R.string.app_name) - } - val contentText = when (publicVersion) { - false -> content - true -> resources.getString(R.string.public_event_notification_text) - } + val contentTitle = if (publicVersion) resources.getString(R.string.app_name) else event.title + + val contentText = if (publicVersion) resources.getString(R.string.public_event_notification_text) else content + val builder = NotificationCompat.Builder(this) .setContentTitle(contentTitle) .setContentText(contentText)