Update notification id
This commit is contained in:
parent
6157bc5689
commit
7ed5f8fa90
2 changed files with 3 additions and 3 deletions
|
|
@ -15,7 +15,7 @@ const val THREAD_ATTACHMENT_URI = "thread_attachment_uri"
|
||||||
const val THREAD_ATTACHMENT_URIS = "thread_attachment_uris"
|
const val THREAD_ATTACHMENT_URIS = "thread_attachment_uris"
|
||||||
const val SEARCHED_MESSAGE_ID = "searched_message_id"
|
const val SEARCHED_MESSAGE_ID = "searched_message_id"
|
||||||
const val USE_SIM_ID_PREFIX = "use_sim_id_"
|
const val USE_SIM_ID_PREFIX = "use_sim_id_"
|
||||||
const val NOTIFICATION_CHANNEL = "simple_sms_messenger"
|
const val NOTIFICATION_CHANNEL_ID = "fossify_messages"
|
||||||
const val SHOW_CHARACTER_COUNTER = "show_character_counter"
|
const val SHOW_CHARACTER_COUNTER = "show_character_counter"
|
||||||
const val USE_SIMPLE_CHARACTERS = "use_simple_characters"
|
const val USE_SIMPLE_CHARACTERS = "use_simple_characters"
|
||||||
const val SEND_ON_ENTER = "send_on_enter"
|
const val SEND_ON_ENTER = "send_on_enter"
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ class NotificationHelper(private val context: Context) {
|
||||||
alertOnlyOnce: Boolean = false
|
alertOnlyOnce: Boolean = false
|
||||||
) {
|
) {
|
||||||
val hasCustomNotifications = context.config.customNotifications.contains(threadId.toString())
|
val hasCustomNotifications = context.config.customNotifications.contains(threadId.toString())
|
||||||
val notificationChannelId = if (hasCustomNotifications) threadId.toString() else NOTIFICATION_CHANNEL
|
val notificationChannelId = if (hasCustomNotifications) threadId.toString() else NOTIFICATION_CHANNEL_ID
|
||||||
if (!hasCustomNotifications) {
|
if (!hasCustomNotifications) {
|
||||||
maybeCreateChannel(notificationChannelId, context.getString(R.string.channel_received_sms))
|
maybeCreateChannel(notificationChannelId, context.getString(R.string.channel_received_sms))
|
||||||
}
|
}
|
||||||
|
|
@ -147,7 +147,7 @@ class NotificationHelper(private val context: Context) {
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
fun showSendingFailedNotification(recipientName: String, threadId: Long) {
|
fun showSendingFailedNotification(recipientName: String, threadId: Long) {
|
||||||
val hasCustomNotifications = context.config.customNotifications.contains(threadId.toString())
|
val hasCustomNotifications = context.config.customNotifications.contains(threadId.toString())
|
||||||
val notificationChannelId = if (hasCustomNotifications) threadId.toString() else NOTIFICATION_CHANNEL
|
val notificationChannelId = if (hasCustomNotifications) threadId.toString() else NOTIFICATION_CHANNEL_ID
|
||||||
if (!hasCustomNotifications) {
|
if (!hasCustomNotifications) {
|
||||||
maybeCreateChannel(notificationChannelId, context.getString(R.string.message_not_sent_short))
|
maybeCreateChannel(notificationChannelId, context.getString(R.string.message_not_sent_short))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue