Update notification id

This commit is contained in:
Naveen 2024-01-19 22:01:15 +05:30
parent 6157bc5689
commit 7ed5f8fa90
No known key found for this signature in database
GPG key ID: 0E155DAD31671DA3
2 changed files with 3 additions and 3 deletions

View file

@ -15,7 +15,7 @@ const val THREAD_ATTACHMENT_URI = "thread_attachment_uri"
const val THREAD_ATTACHMENT_URIS = "thread_attachment_uris"
const val SEARCHED_MESSAGE_ID = "searched_message_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 USE_SIMPLE_CHARACTERS = "use_simple_characters"
const val SEND_ON_ENTER = "send_on_enter"

View file

@ -46,7 +46,7 @@ class NotificationHelper(private val context: Context) {
alertOnlyOnce: Boolean = false
) {
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) {
maybeCreateChannel(notificationChannelId, context.getString(R.string.channel_received_sms))
}
@ -147,7 +147,7 @@ class NotificationHelper(private val context: Context) {
@SuppressLint("NewApi")
fun showSendingFailedNotification(recipientName: String, threadId: Long) {
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) {
maybeCreateChannel(notificationChannelId, context.getString(R.string.message_not_sent_short))
}