Merge remote-tracking branch 'origin/HEAD'

This commit is contained in:
Vitor Pamplona
2023-05-22 15:11:10 -04:00
@@ -263,7 +263,11 @@ fun NoteCompose(
onClick = {
scope.launch {
routeFor(note, loggedIn)?.let {
navController.navigate(it)
if (note.idHex != navController.currentBackStackEntry?.arguments?.getString("id")) {
navController.navigate(it)
} else {
Log.d("Amethyst-Navigation", "Note already exists in the backstack!")
}
}
}
},
@@ -1958,7 +1962,11 @@ fun NoteAuthorPicture(
pictureModifier: Modifier = Modifier
) {
NoteAuthorPicture(baseNote, userAccount, size, pictureModifier) {
navController.navigate("User/${it.pubkeyHex}")
if (it.pubkeyHex != navController.currentBackStackEntry?.arguments?.getString("id")) {
navController.navigate("User/${it.pubkeyHex}")
} else {
Log.d("Amethyst-Navigation", "Profile destination already exists in the backstack!")
}
}
}
@@ -2011,7 +2019,11 @@ fun UserPicture(
pictureModifier: Modifier = Modifier
) {
UserPicture(user, userAccount, size, pictureModifier) {
navController.navigate("User/${it.pubkeyHex}")
if (it.pubkeyHex != navController.currentBackStackEntry?.arguments?.getString("id")) {
navController.navigate("User/${it.pubkeyHex}")
} else {
Log.d("Amethyst-Navigation", "Profile destination already exists in the backstack!")
}
}
}