mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-07-09 18:19:57 +02:00
Improvements to the rendering of long form content.
This commit is contained in:
@ -61,7 +61,7 @@ import com.vitorpamplona.amethyst.ui.components.ObserveDisplayNip05Status
|
|||||||
import com.vitorpamplona.amethyst.ui.note.*
|
import com.vitorpamplona.amethyst.ui.note.*
|
||||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
|
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
|
||||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.ChannelHeader
|
import com.vitorpamplona.amethyst.ui.screen.loggedIn.ChannelHeader
|
||||||
import com.vitorpamplona.amethyst.ui.theme.HalfDoubleVertSpacer
|
import com.vitorpamplona.amethyst.ui.theme.DoubleVertSpacer
|
||||||
import com.vitorpamplona.amethyst.ui.theme.SmallBorder
|
import com.vitorpamplona.amethyst.ui.theme.SmallBorder
|
||||||
import com.vitorpamplona.amethyst.ui.theme.lessImportantLink
|
import com.vitorpamplona.amethyst.ui.theme.lessImportantLink
|
||||||
import com.vitorpamplona.amethyst.ui.theme.placeholderText
|
import com.vitorpamplona.amethyst.ui.theme.placeholderText
|
||||||
@ -147,7 +147,7 @@ fun ThreadFeedView(noteId: String, viewModel: FeedViewModel, accountViewModel: A
|
|||||||
) {
|
) {
|
||||||
itemsIndexed(state.feed.value, key = { _, item -> item.idHex }) { index, item ->
|
itemsIndexed(state.feed.value, key = { _, item -> item.idHex }) { index, item ->
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
ProvideTextStyle(TextStyle(fontSize = 16.sp, lineHeight = 1.20.em)) {
|
ProvideTextStyle(TextStyle(fontSize = 18.sp, lineHeight = 1.20.em)) {
|
||||||
NoteMaster(
|
NoteMaster(
|
||||||
item,
|
item,
|
||||||
modifier = Modifier.drawReplyLevel(
|
modifier = Modifier.drawReplyLevel(
|
||||||
@ -467,7 +467,7 @@ fun NoteMaster(
|
|||||||
val noteEvent = baseNote.event
|
val noteEvent = baseNote.event
|
||||||
val zapSplits = remember(noteEvent) { noteEvent?.hasZapSplitSetup() ?: false }
|
val zapSplits = remember(noteEvent) { noteEvent?.hasZapSplitSetup() ?: false }
|
||||||
if (zapSplits && noteEvent != null) {
|
if (zapSplits && noteEvent != null) {
|
||||||
Spacer(modifier = HalfDoubleVertSpacer)
|
Spacer(modifier = DoubleVertSpacer)
|
||||||
DisplayZapSplits(noteEvent, accountViewModel, nav)
|
DisplayZapSplits(noteEvent, accountViewModel, nav)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -597,20 +597,20 @@ private fun RenderLongFormHeaderForThread(noteEvent: LongTextNoteEvent) {
|
|||||||
contentScale = ContentScale.FillWidth,
|
contentScale = ContentScale.FillWidth,
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.fillMaxWidth()
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(10.dp))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
noteEvent.title()?.let {
|
noteEvent.title()?.let {
|
||||||
|
Spacer(modifier = DoubleVertSpacer)
|
||||||
Text(
|
Text(
|
||||||
text = it,
|
text = it,
|
||||||
fontSize = 28.sp,
|
fontSize = 28.sp,
|
||||||
fontWeight = FontWeight.Light,
|
fontWeight = FontWeight.Light,
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.fillMaxWidth()
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(10.dp))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
noteEvent.summary()?.let {
|
noteEvent.summary()?.ifBlank { null }?.let {
|
||||||
|
Spacer(modifier = DoubleVertSpacer)
|
||||||
Text(
|
Text(
|
||||||
text = it,
|
text = it,
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
|
Reference in New Issue
Block a user