feat(notif): Open FAQ URL from worker notification

Co-authored-by: ugurtafrali <tafraliugur@gmail.com>
This commit is contained in:
Inhishonor
2026-08-30 08:12:30 -07:00
parent 60045b56cd
commit 3775a1948b
@@ -103,10 +103,18 @@ class NotificationManagerImpl @Inject constructor(
} }
// Required for running workers on Android 12 and older // Required for running workers on Android 12 and older
override fun getForegroundNotificationForWorkersOnOlderAndroids() = override fun getForegroundNotificationForWorkersOnOlderAndroids(): Notification {
NotificationCompat.Builder(context, RECEIVING_WORKER_CHANNEL_ID) val faqIntent = Intent(
Intent.ACTION_VIEW,
"https://github.com/quik-sms/quik/wiki/Frequently-Asked-Questions#why-do-i-have-a-persistent-notification-saying-receiving-messages".toUri()
)
val faqPendingIntent = PendingIntent.getActivity(
context, 0, faqIntent, PendingIntent.FLAG_IMMUTABLE
)
return NotificationCompat.Builder(context, RECEIVING_WORKER_CHANNEL_ID)
.setContentTitle(context.getString(R.string.notification_foreground_worker_title)) .setContentTitle(context.getString(R.string.notification_foreground_worker_title))
.setContentText(context.getString(R.string.notification_foreground_worker_text)) .setContentText(context.getString(R.string.notification_foreground_worker_text))
.setContentIntent(faqPendingIntent)
.setShowWhen(false) .setShowWhen(false)
.setWhen(System.currentTimeMillis()) .setWhen(System.currentTimeMillis())
.setSmallIcon(R.drawable.ic_notification_worker) .setSmallIcon(R.drawable.ic_notification_worker)
@@ -116,7 +124,7 @@ class NotificationManagerImpl @Inject constructor(
.setOngoing(true) .setOngoing(true)
.setSilent(true) .setSilent(true)
.build() .build()
}
/** /**
* Updates the notification for a particular conversation * Updates the notification for a particular conversation
*/ */