Invites : open room instead of invite list when clicking an invite notification

This commit is contained in:
ganfra
2024-04-16 13:20:43 +02:00
parent 0e65ea8eb8
commit 8f583d78ac
12 changed files with 1 additions and 49 deletions

View File

@@ -31,8 +31,4 @@ interface IntentProvider {
threadId: ThreadId?,
): Intent
/**
* Provide an intent to start the application on the invite list.
*/
fun getInviteListIntent(sessionId: SessionId): Intent
}

View File

@@ -157,7 +157,7 @@ class NotificationCreator @Inject constructor(
// .addAction(acceptInvitationActionFactory.create(inviteNotifiableEvent))
.apply {
// Build the pending intent for when the notification is clicked
setContentIntent(pendingIntentFactory.createInviteListPendingIntent(inviteNotifiableEvent.sessionId))
setContentIntent(pendingIntentFactory.createOpenRoomPendingIntent(inviteNotifiableEvent.sessionId, inviteNotifiableEvent.roomId))
if (inviteNotifiableEvent.noisy) {
// Compat

View File

@@ -128,9 +128,4 @@ class PendingIntentFactory @Inject constructor(
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
)
}
fun createInviteListPendingIntent(sessionId: SessionId): PendingIntent {
val intent = intentProvider.getInviteListIntent(sessionId)
return PendingIntentCompat.getActivity(context, 0, intent, 0, false)!!
}
}