kopia lustrzana https://github.com/vitorpamplona/amethyst
add draft support for public chat screen
rodzic
2bc2890d08
commit
f949d5624e
|
@ -455,6 +455,9 @@ private fun MessageBubbleLines(
|
|||
bubbleSize = bubbleSize,
|
||||
availableBubbleSize = availableBubbleSize,
|
||||
firstColumn = {
|
||||
if (baseNote.isDraft()) {
|
||||
DisplayDraftChat()
|
||||
}
|
||||
IncognitoBadge(baseNote)
|
||||
ChatTimeAgo(baseNote)
|
||||
RelayBadgesHorizontal(baseNote, accountViewModel, nav = nav)
|
||||
|
|
|
@ -115,7 +115,9 @@ import com.vitorpamplona.amethyst.ui.screen.loggedIn.ChannelHeader
|
|||
import com.vitorpamplona.amethyst.ui.theme.DividerThickness
|
||||
import com.vitorpamplona.amethyst.ui.theme.DoubleHorzSpacer
|
||||
import com.vitorpamplona.amethyst.ui.theme.DoubleVertSpacer
|
||||
import com.vitorpamplona.amethyst.ui.theme.Font12SP
|
||||
import com.vitorpamplona.amethyst.ui.theme.HalfDoubleVertSpacer
|
||||
import com.vitorpamplona.amethyst.ui.theme.HalfEndPadding
|
||||
import com.vitorpamplona.amethyst.ui.theme.HalfPadding
|
||||
import com.vitorpamplona.amethyst.ui.theme.HalfStartPadding
|
||||
import com.vitorpamplona.amethyst.ui.theme.Size25dp
|
||||
|
@ -1128,6 +1130,18 @@ fun DisplayDraft() {
|
|||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun DisplayDraftChat() {
|
||||
Text(
|
||||
"Draft",
|
||||
color = MaterialTheme.colorScheme.placeholderText,
|
||||
modifier = HalfEndPadding,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = Font12SP,
|
||||
maxLines = 1,
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun FirstUserInfoRow(
|
||||
baseNote: Note,
|
||||
|
|
|
@ -208,6 +208,7 @@ fun PrepareChannelViewModels(
|
|||
val channelScreenModel: NewPostViewModel = viewModel()
|
||||
channelScreenModel.accountViewModel = accountViewModel
|
||||
channelScreenModel.account = accountViewModel.account
|
||||
channelScreenModel.originalNote = LocalCache.getNoteIfExists(baseChannel.idHex)
|
||||
|
||||
ChannelScreen(
|
||||
channel = baseChannel,
|
||||
|
|
|
@ -92,6 +92,7 @@ val Size40dp = 40.dp
|
|||
val Size55dp = 55.dp
|
||||
val Size75dp = 75.dp
|
||||
|
||||
val HalfEndPadding = Modifier.padding(end = 5.dp)
|
||||
val HalfStartPadding = Modifier.padding(start = 5.dp)
|
||||
val StdStartPadding = Modifier.padding(start = 10.dp)
|
||||
val StdTopPadding = Modifier.padding(top = 10.dp)
|
||||
|
|
Ładowanie…
Reference in New Issue