Use a separate notification id for failure notifications

This way failure notifications won't overwrite the existing chat notifications (if there are any) as they also use thread id as notification id
This commit is contained in:
Naveen 2022-12-08 01:42:43 +05:30
parent 0523d93243
commit 35e9141888
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ class NotificationHelper(private val context: Context) {
fun showSendingFailedNotification(recipientName: String, threadId: Long) {
maybeCreateChannel(name = context.getString(R.string.message_not_sent_short))
val notificationId = threadId.hashCode()
val notificationId = generateRandomId().hashCode()
val intent = Intent(context, ThreadActivity::class.java).apply {
putExtra(THREAD_ID, threadId)
}