Skip to content

Commit

Permalink
Adds back button to the top of the Nav bar of the Thread view.
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorpamplona committed Nov 29, 2023
1 parent dbbfaae commit b9486eb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ private fun RenderTopRouteBar(
Route.Community.base -> CommunityTopBar(id, accountViewModel, nav, navPopBack)
Route.Hashtag.base -> HashTagTopBar(id, accountViewModel, navPopBack)
Route.Geohash.base -> GeoHashTopBar(id, accountViewModel, navPopBack)
Route.Note.base -> ThreadTopBar(id, accountViewModel, navPopBack)
else -> MainTopBar(drawerState, accountViewModel, nav)
}
} else {
Expand All @@ -187,6 +188,20 @@ private fun RenderTopRouteBar(
}
}

@Composable
private fun ThreadTopBar(
id: String,
accountViewModel: AccountViewModel,
navPopBack: () -> Unit
) {
FlexibleTopBarWithBackButton(
title = {
Text(stringResource(id = R.string.thread_title))
},
popBack = navPopBack
)
}

@Composable
private fun GeoHashTopBar(
tag: String,
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -663,4 +663,5 @@
</string>

<string name="payment_required_title">Message from %1$s</string>
<string name="thread_title">Thread</string>
</resources>

0 comments on commit b9486eb

Please sign in to comment.