when clicking in a repost of a note, redirects the user to the note directly.

This commit is contained in:
Vitor Pamplona 2023-07-12 18:19:40 -04:00
parent 135eb6763a
commit c87466ada4

View File

@ -840,7 +840,12 @@ fun ClickableNote(
.combinedClickable(
onClick = {
scope.launch {
routeFor(baseNote, accountViewModel.userProfile())?.let {
val redirectToNote = if (baseNote.event is RepostEvent || baseNote.event is GenericRepostEvent) {
baseNote.replyTo?.lastOrNull() ?: baseNote
} else {
baseNote
}
routeFor(redirectToNote, accountViewModel.userProfile())?.let {
nav(it)
}
}