Changes requested by tibbi

This commit is contained in:
Florian Angermeier 2018-04-11 00:05:55 +02:00
parent 3ef480a80d
commit f9eb5e6873

View File

@ -184,14 +184,10 @@ fun Context.getNotification(pendingIntent: PendingIntent, event: Event, content:
val soundUri = Uri.parse(config.reminderSoundUri) val soundUri = Uri.parse(config.reminderSoundUri)
grantReadUriPermission(config.reminderSoundUri) grantReadUriPermission(config.reminderSoundUri)
val contentTitle = when (publicVersion) { val contentTitle = if (publicVersion) resources.getString(R.string.app_name) else event.title
false -> event.title
true -> resources.getString(R.string.app_name) val contentText = if (publicVersion) resources.getString(R.string.public_event_notification_text) else content
}
val contentText = when (publicVersion) {
false -> content
true -> resources.getString(R.string.public_event_notification_text)
}
val builder = NotificationCompat.Builder(this) val builder = NotificationCompat.Builder(this)
.setContentTitle(contentTitle) .setContentTitle(contentTitle)
.setContentText(contentText) .setContentText(contentText)