add draft support for public chat screen
This commit is contained in:
@@ -455,6 +455,9 @@ private fun MessageBubbleLines(
|
|||||||
bubbleSize = bubbleSize,
|
bubbleSize = bubbleSize,
|
||||||
availableBubbleSize = availableBubbleSize,
|
availableBubbleSize = availableBubbleSize,
|
||||||
firstColumn = {
|
firstColumn = {
|
||||||
|
if (baseNote.isDraft()) {
|
||||||
|
DisplayDraftChat()
|
||||||
|
}
|
||||||
IncognitoBadge(baseNote)
|
IncognitoBadge(baseNote)
|
||||||
ChatTimeAgo(baseNote)
|
ChatTimeAgo(baseNote)
|
||||||
RelayBadgesHorizontal(baseNote, accountViewModel, nav = nav)
|
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.DividerThickness
|
||||||
import com.vitorpamplona.amethyst.ui.theme.DoubleHorzSpacer
|
import com.vitorpamplona.amethyst.ui.theme.DoubleHorzSpacer
|
||||||
import com.vitorpamplona.amethyst.ui.theme.DoubleVertSpacer
|
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.HalfDoubleVertSpacer
|
||||||
|
import com.vitorpamplona.amethyst.ui.theme.HalfEndPadding
|
||||||
import com.vitorpamplona.amethyst.ui.theme.HalfPadding
|
import com.vitorpamplona.amethyst.ui.theme.HalfPadding
|
||||||
import com.vitorpamplona.amethyst.ui.theme.HalfStartPadding
|
import com.vitorpamplona.amethyst.ui.theme.HalfStartPadding
|
||||||
import com.vitorpamplona.amethyst.ui.theme.Size25dp
|
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
|
@Composable
|
||||||
fun FirstUserInfoRow(
|
fun FirstUserInfoRow(
|
||||||
baseNote: Note,
|
baseNote: Note,
|
||||||
|
|||||||
@@ -208,6 +208,7 @@ fun PrepareChannelViewModels(
|
|||||||
val channelScreenModel: NewPostViewModel = viewModel()
|
val channelScreenModel: NewPostViewModel = viewModel()
|
||||||
channelScreenModel.accountViewModel = accountViewModel
|
channelScreenModel.accountViewModel = accountViewModel
|
||||||
channelScreenModel.account = accountViewModel.account
|
channelScreenModel.account = accountViewModel.account
|
||||||
|
channelScreenModel.originalNote = LocalCache.getNoteIfExists(baseChannel.idHex)
|
||||||
|
|
||||||
ChannelScreen(
|
ChannelScreen(
|
||||||
channel = baseChannel,
|
channel = baseChannel,
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ val Size40dp = 40.dp
|
|||||||
val Size55dp = 55.dp
|
val Size55dp = 55.dp
|
||||||
val Size75dp = 75.dp
|
val Size75dp = 75.dp
|
||||||
|
|
||||||
|
val HalfEndPadding = Modifier.padding(end = 5.dp)
|
||||||
val HalfStartPadding = Modifier.padding(start = 5.dp)
|
val HalfStartPadding = Modifier.padding(start = 5.dp)
|
||||||
val StdStartPadding = Modifier.padding(start = 10.dp)
|
val StdStartPadding = Modifier.padding(start = 10.dp)
|
||||||
val StdTopPadding = Modifier.padding(top = 10.dp)
|
val StdTopPadding = Modifier.padding(top = 10.dp)
|
||||||
|
|||||||
Reference in New Issue
Block a user