Removes unused addMargin param.

This commit is contained in:
Vitor Pamplona 2024-03-19 11:50:01 -04:00
parent 25f28d38d5
commit e9830c61aa
4 changed files with 3 additions and 25 deletions

View File

@ -104,7 +104,6 @@ fun MessageSetCompose(
baseNote = baseNote,
routeForLastRead = null,
isBoostedNote = true,
addMarginTop = false,
showHidden = showHidden,
quotesLeft = 1,
parentBackgroundColor = backgroundColor,

View File

@ -124,7 +124,6 @@ import com.vitorpamplona.amethyst.ui.theme.boostedNoteModifier
import com.vitorpamplona.amethyst.ui.theme.channelNotePictureModifier
import com.vitorpamplona.amethyst.ui.theme.grayText
import com.vitorpamplona.amethyst.ui.theme.newItemBackgroundColor
import com.vitorpamplona.amethyst.ui.theme.normalNoteModifier
import com.vitorpamplona.amethyst.ui.theme.normalWithTopMarginNoteModifier
import com.vitorpamplona.amethyst.ui.theme.replyBackground
import com.vitorpamplona.amethyst.ui.theme.replyModifier
@ -177,7 +176,6 @@ fun NoteCompose(
isQuotedNote: Boolean = false,
unPackReply: Boolean = true,
makeItShort: Boolean = false,
addMarginTop: Boolean = true,
showHidden: Boolean = false,
quotesLeft: Int,
parentBackgroundColor: MutableState<Color>? = null,
@ -198,7 +196,7 @@ fun NoteCompose(
accountViewModel = accountViewModel,
nav = nav,
) { canPreview ->
NormalNote(
AcceptableNote(
baseNote = baseNote,
routeForLastRead = routeForLastRead,
modifier = modifier,
@ -206,7 +204,6 @@ fun NoteCompose(
isQuotedNote = isQuotedNote,
unPackReply = unPackReply,
makeItShort = makeItShort,
addMarginTop = addMarginTop,
canPreview = canPreview,
quotesLeft = quotesLeft,
parentBackgroundColor = parentBackgroundColor,
@ -383,7 +380,7 @@ fun WatchForReports(
}
@Composable
fun NormalNote(
fun AcceptableNote(
baseNote: Note,
routeForLastRead: String? = null,
modifier: Modifier = Modifier,
@ -391,7 +388,6 @@ fun NormalNote(
isQuotedNote: Boolean = false,
unPackReply: Boolean = true,
makeItShort: Boolean = false,
addMarginTop: Boolean = true,
canPreview: Boolean = true,
quotesLeft: Int,
parentBackgroundColor: MutableState<Color>? = null,
@ -423,7 +419,6 @@ fun NormalNote(
isQuotedNote = isQuotedNote,
unPackReply = unPackReply,
makeItShort = makeItShort,
addMarginTop = addMarginTop,
canPreview = canPreview,
quotesLeft = quotesLeft,
parentBackgroundColor = parentBackgroundColor,
@ -460,7 +455,6 @@ fun NormalNote(
isQuotedNote = isQuotedNote,
unPackReply = unPackReply,
makeItShort = makeItShort,
addMarginTop = addMarginTop,
canPreview = canPreview,
quotesLeft = quotesLeft,
parentBackgroundColor = parentBackgroundColor,
@ -512,7 +506,6 @@ private fun CheckNewAndRenderNote(
isQuotedNote: Boolean = false,
unPackReply: Boolean = true,
makeItShort: Boolean = false,
addMarginTop: Boolean = true,
canPreview: Boolean = true,
quotesLeft: Int,
parentBackgroundColor: MutableState<Color>? = null,
@ -541,7 +534,6 @@ private fun CheckNewAndRenderNote(
backgroundColor = backgroundColor,
isBoostedNote = isBoostedNote,
isQuotedNote = isQuotedNote,
addMarginTop = addMarginTop,
unPackReply = unPackReply,
makeItShort = makeItShort,
canPreview = canPreview,
@ -594,7 +586,6 @@ fun InnerNoteWithReactions(
backgroundColor: MutableState<Color>,
isBoostedNote: Boolean,
isQuotedNote: Boolean,
addMarginTop: Boolean,
unPackReply: Boolean,
makeItShort: Boolean,
canPreview: Boolean,
@ -607,10 +598,8 @@ fun InnerNoteWithReactions(
Row(
modifier =
if (!isBoostedNote && addMarginTop) {
if (!isBoostedNote) {
normalWithTopMarginNoteModifier
} else if (!isBoostedNote) {
normalNoteModifier
} else {
boostedNoteModifier
},

View File

@ -289,7 +289,6 @@ fun NoteCardCompose(
isQuotedNote: Boolean = false,
unPackReply: Boolean = true,
makeItShort: Boolean = false,
addMarginTop: Boolean = true,
showHidden: Boolean = false,
parentBackgroundColor: MutableState<Color>? = null,
accountViewModel: AccountViewModel,
@ -305,7 +304,6 @@ fun NoteCardCompose(
isQuotedNote = isQuotedNote,
unPackReply = unPackReply,
makeItShort = makeItShort,
addMarginTop = addMarginTop,
showHidden = showHidden,
quotesLeft = 3,
parentBackgroundColor = parentBackgroundColor,

View File

@ -200,14 +200,6 @@ val imageHeaderBannerSize = Modifier.fillMaxWidth().height(150.dp)
val authorNotePictureForImageHeader = Modifier.size(75.dp).padding(10.dp)
val normalNoteModifier =
Modifier.fillMaxWidth()
.padding(
start = 12.dp,
end = 12.dp,
top = 0.dp,
)
val normalWithTopMarginNoteModifier =
Modifier.fillMaxWidth()
.padding(