mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-27 23:56:25 +02:00
when clicking in a repost of a note, redirects the user to the note directly.
This commit is contained in:
@@ -840,7 +840,12 @@ fun ClickableNote(
|
|||||||
.combinedClickable(
|
.combinedClickable(
|
||||||
onClick = {
|
onClick = {
|
||||||
scope.launch {
|
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)
|
nav(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user