From 27286c7ffeab8239c4925e4a3297c3e9efc47d79 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Wed, 18 Oct 2023 18:26:31 -0400 Subject: [PATCH] Removing bold titles --- .../amethyst/ui/navigation/AppTopBar.kt | 13 ++++--------- .../vitorpamplona/amethyst/ui/note/NoteCompose.kt | 3 +-- .../amethyst/ui/screen/loggedIn/ChannelScreen.kt | 2 -- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppTopBar.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppTopBar.kt index 2a957c646..dc25657e0 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppTopBar.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppTopBar.kt @@ -211,7 +211,6 @@ private fun HashTagTopBar( title = { Text( remember(tag) { "#$tag" }, - fontWeight = FontWeight.Bold, modifier = Modifier.weight(1f) ) @@ -232,7 +231,7 @@ private fun CommunityTopBar( if (baseNote != null) { FlexibleTopBarWithBackButton( title = { - ShortCommunityHeader(baseNote, fontWeight = FontWeight.Medium, accountViewModel, nav) + ShortCommunityHeader(baseNote, accountViewModel, nav) }, extendableRow = { Column(Modifier.verticalScroll(rememberScrollState())) { @@ -299,7 +298,7 @@ private fun RenderRoomTopBar( Spacer(modifier = DoubleHorzSpacer) - UsernameDisplay(baseUser, Modifier.weight(1f), fontWeight = FontWeight.Medium) + UsernameDisplay(baseUser, Modifier.weight(1f), fontWeight = FontWeight.Normal) } } }, @@ -330,7 +329,7 @@ private fun RenderRoomTopBar( Modifier .padding(start = 10.dp) .weight(1f), - fontWeight = FontWeight.Medium, + fontWeight = FontWeight.Normal, accountViewModel.userProfile() ) }, @@ -355,7 +354,6 @@ private fun ChannelTopBar( ShortChannelHeader( baseChannel = baseChannel, accountViewModel = accountViewModel, - fontWeight = FontWeight.Medium, nav = nav, showFlag = true ) @@ -829,10 +827,7 @@ fun FlexibleTopBarWithBackButton( title = title, extendableRow = extendableRow, navigationIcon = { - IconButton( - onClick = popBack, - modifier = Modifier - ) { + IconButton(onClick = popBack) { ArrowBackIcon() } }, diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt index 889bc6f87..7a9ad342e 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt @@ -723,7 +723,7 @@ fun LongCommunityHeader( } @Composable -fun ShortCommunityHeader(baseNote: AddressableNote, fontWeight: FontWeight = FontWeight.Bold, accountViewModel: AccountViewModel, nav: (String) -> Unit) { +fun ShortCommunityHeader(baseNote: AddressableNote, accountViewModel: AccountViewModel, nav: (String) -> Unit) { val noteState by baseNote.live().metadata.observeAsState() val noteEvent = remember(noteState) { noteState?.note?.event as? CommunityDefinitionEvent } ?: return @@ -753,7 +753,6 @@ fun ShortCommunityHeader(baseNote: AddressableNote, fontWeight: FontWeight = Fon Row(verticalAlignment = Alignment.CenterVertically) { Text( text = remember(noteState) { noteEvent.dTag() }, - fontWeight = fontWeight, maxLines = 1, overflow = TextOverflow.Ellipsis ) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/ChannelScreen.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/ChannelScreen.kt index 638f7791b..a36428ccb 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/ChannelScreen.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/ChannelScreen.kt @@ -684,7 +684,6 @@ fun ShowVideoStreaming( fun ShortChannelHeader( baseChannel: Channel, accountViewModel: AccountViewModel, - fontWeight: FontWeight = FontWeight.Bold, nav: (String) -> Unit, showFlag: Boolean ) { @@ -730,7 +729,6 @@ fun ShortChannelHeader( Row(verticalAlignment = Alignment.CenterVertically) { Text( text = remember(channelState) { channel.toBestDisplayName() }, - fontWeight = fontWeight, maxLines = 1, overflow = TextOverflow.Ellipsis )