Adds back button to the top of the Nav bar of the Thread view.

This commit is contained in:
Vitor Pamplona 2023-11-29 10:38:31 -05:00
parent dbbfaae02c
commit b9486eb3e6
2 changed files with 16 additions and 0 deletions

View File

@ -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 {
@ -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,

View File

@ -663,4 +663,5 @@
</string>
<string name="payment_required_title">Message from %1$s</string>
<string name="thread_title">Thread</string>
</resources>