Skip to content

Commit 079f92e

Browse files
feat: added launchSingleTop in navigate
1 parent 487a288 commit 079f92e

File tree

1 file changed

+3
-1
lines changed
  • feature/topic/src/main/java/com/google/samples/apps/nowinandroid/feature/topic/navigation

1 file changed

+3
-1
lines changed

feature/topic/src/main/java/com/google/samples/apps/nowinandroid/feature/topic/navigation/TopicNavigation.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ internal class TopicArgs(val topicId: String) {
3737

3838
fun NavController.navigateToTopic(topicId: String) {
3939
val encodedId = Uri.encode(topicId)
40-
this.navigate("topic_route/$encodedId")
40+
this.navigate("topic_route/$encodedId") {
41+
launchSingleTop = true
42+
}
4143
}
4244

4345
fun NavGraphBuilder.topicScreen(

0 commit comments

Comments
 (0)