Fixed clicking message notification not going into conversation

This commit is contained in:
Sylvain Berfini 2024-05-31 10:50:16 +02:00
parent 56d8e64762
commit 1741ed5fe5
2 changed files with 3 additions and 2 deletions

View file

@ -1405,6 +1405,7 @@ class NotificationsManager @MainThread constructor(private val context: Context)
return TaskStackBuilder.create(context).run {
addNextIntentWithParentStack(
Intent(context, MainActivity::class.java).apply {
setAction(Intent.ACTION_MAIN) // Needed as well
putExtras(args) // Need to pass args here for Chat extra
}
)

View file

@ -432,9 +432,9 @@ class MainActivity : GenericActivity() {
Log.i(
"$TAG Handling intent action [${intent.action}], type [${intent.type}], data [${intent.data}] and has ${if (hasExtra) "extras" else "no extra"}"
)
if (intent.action == null) return
when (intent.action) {
val action = intent.action ?: return
when (action) {
Intent.ACTION_SEND -> {
handleSendIntent(intent, false)
}