mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-04-08 20:08:06 +02:00
More spacing refinements for notes.
This commit is contained in:
parent
816a22ec69
commit
a2ad13c54a
@ -25,10 +25,10 @@ import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
|
||||
import kotlinx.collections.immutable.ImmutableSet
|
||||
|
||||
@Composable
|
||||
fun BlankNote(modifier: Modifier = Modifier, isQuote: Boolean = false, idHex: String? = null) {
|
||||
fun BlankNote(modifier: Modifier = Modifier, showDivider: Boolean = false, idHex: String? = null) {
|
||||
Column(modifier = modifier) {
|
||||
Row(modifier = Modifier.padding(horizontal = if (!isQuote) 12.dp else 6.dp)) {
|
||||
Column(modifier = Modifier.padding(start = if (!isQuote) 10.dp else 5.dp)) {
|
||||
Row() {
|
||||
Column() {
|
||||
Row(
|
||||
modifier = Modifier.padding(
|
||||
start = 20.dp,
|
||||
@ -46,7 +46,7 @@ fun BlankNote(modifier: Modifier = Modifier, isQuote: Boolean = false, idHex: St
|
||||
)
|
||||
}
|
||||
|
||||
if (!isQuote) {
|
||||
if (!showDivider) {
|
||||
Divider(
|
||||
modifier = Modifier.padding(vertical = 10.dp),
|
||||
thickness = 0.25.dp
|
||||
|
@ -356,7 +356,6 @@ private fun WatchForReports(
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalFoundationApi::class)
|
||||
@Composable
|
||||
fun NormalNote(
|
||||
baseNote: Note,
|
||||
@ -490,19 +489,17 @@ private fun NoteWithReactions(
|
||||
start = if (!isBoostedNote) 12.dp else 0.dp,
|
||||
end = if (!isBoostedNote) 12.dp else 0.dp,
|
||||
top = if (addMarginTop && !isBoostedNote) 10.dp else 0.dp
|
||||
// Don't add margin to the bottom because of the Divider down below
|
||||
)
|
||||
}
|
||||
) {
|
||||
if (notBoostedNorQuote) {
|
||||
DrawAuthorImages(baseNote, accountViewModel, nav)
|
||||
Spacer(modifier = Modifier.width(10.dp))
|
||||
}
|
||||
|
||||
NoteBody(
|
||||
baseNote,
|
||||
modifier = remember {
|
||||
Modifier
|
||||
.padding(start = if (notBoostedNorQuote) 10.dp else 0.dp)
|
||||
},
|
||||
isQuotedNote,
|
||||
unPackReply,
|
||||
makeItShort,
|
||||
@ -529,7 +526,7 @@ private fun NoteWithReactions(
|
||||
nav
|
||||
)
|
||||
} else {
|
||||
if (!isQuotedNote && !isBoostedNote) {
|
||||
if (!isQuotedNote && !isBoostedNote && baseNote.event !is RepostEvent) {
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
}
|
||||
}
|
||||
@ -545,7 +542,6 @@ private fun NoteWithReactions(
|
||||
@Composable
|
||||
private fun NoteBody(
|
||||
baseNote: Note,
|
||||
modifier: Modifier,
|
||||
showAuthorPicture: Boolean = false,
|
||||
unPackReply: Boolean = true,
|
||||
makeItShort: Boolean = false,
|
||||
@ -555,9 +551,7 @@ private fun NoteBody(
|
||||
accountViewModel: AccountViewModel,
|
||||
nav: (String) -> Unit
|
||||
) {
|
||||
Column(
|
||||
modifier = modifier
|
||||
) {
|
||||
Column() {
|
||||
FirstUserInfoRow(
|
||||
baseNote = baseNote,
|
||||
showAuthorPicture = showAuthorPicture,
|
||||
|
@ -443,7 +443,6 @@ fun NoteMaster(
|
||||
ReactionsRow(note, true, accountViewModel, nav)
|
||||
|
||||
Divider(
|
||||
modifier = Modifier.padding(top = 10.dp),
|
||||
thickness = 0.25.dp
|
||||
)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user