Removes unused addMargin param.
This commit is contained in:
@@ -104,7 +104,6 @@ fun MessageSetCompose(
|
|||||||
baseNote = baseNote,
|
baseNote = baseNote,
|
||||||
routeForLastRead = null,
|
routeForLastRead = null,
|
||||||
isBoostedNote = true,
|
isBoostedNote = true,
|
||||||
addMarginTop = false,
|
|
||||||
showHidden = showHidden,
|
showHidden = showHidden,
|
||||||
quotesLeft = 1,
|
quotesLeft = 1,
|
||||||
parentBackgroundColor = backgroundColor,
|
parentBackgroundColor = backgroundColor,
|
||||||
|
|||||||
@@ -124,7 +124,6 @@ import com.vitorpamplona.amethyst.ui.theme.boostedNoteModifier
|
|||||||
import com.vitorpamplona.amethyst.ui.theme.channelNotePictureModifier
|
import com.vitorpamplona.amethyst.ui.theme.channelNotePictureModifier
|
||||||
import com.vitorpamplona.amethyst.ui.theme.grayText
|
import com.vitorpamplona.amethyst.ui.theme.grayText
|
||||||
import com.vitorpamplona.amethyst.ui.theme.newItemBackgroundColor
|
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.normalWithTopMarginNoteModifier
|
||||||
import com.vitorpamplona.amethyst.ui.theme.replyBackground
|
import com.vitorpamplona.amethyst.ui.theme.replyBackground
|
||||||
import com.vitorpamplona.amethyst.ui.theme.replyModifier
|
import com.vitorpamplona.amethyst.ui.theme.replyModifier
|
||||||
@@ -177,7 +176,6 @@ fun NoteCompose(
|
|||||||
isQuotedNote: Boolean = false,
|
isQuotedNote: Boolean = false,
|
||||||
unPackReply: Boolean = true,
|
unPackReply: Boolean = true,
|
||||||
makeItShort: Boolean = false,
|
makeItShort: Boolean = false,
|
||||||
addMarginTop: Boolean = true,
|
|
||||||
showHidden: Boolean = false,
|
showHidden: Boolean = false,
|
||||||
quotesLeft: Int,
|
quotesLeft: Int,
|
||||||
parentBackgroundColor: MutableState<Color>? = null,
|
parentBackgroundColor: MutableState<Color>? = null,
|
||||||
@@ -198,7 +196,7 @@ fun NoteCompose(
|
|||||||
accountViewModel = accountViewModel,
|
accountViewModel = accountViewModel,
|
||||||
nav = nav,
|
nav = nav,
|
||||||
) { canPreview ->
|
) { canPreview ->
|
||||||
NormalNote(
|
AcceptableNote(
|
||||||
baseNote = baseNote,
|
baseNote = baseNote,
|
||||||
routeForLastRead = routeForLastRead,
|
routeForLastRead = routeForLastRead,
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
@@ -206,7 +204,6 @@ fun NoteCompose(
|
|||||||
isQuotedNote = isQuotedNote,
|
isQuotedNote = isQuotedNote,
|
||||||
unPackReply = unPackReply,
|
unPackReply = unPackReply,
|
||||||
makeItShort = makeItShort,
|
makeItShort = makeItShort,
|
||||||
addMarginTop = addMarginTop,
|
|
||||||
canPreview = canPreview,
|
canPreview = canPreview,
|
||||||
quotesLeft = quotesLeft,
|
quotesLeft = quotesLeft,
|
||||||
parentBackgroundColor = parentBackgroundColor,
|
parentBackgroundColor = parentBackgroundColor,
|
||||||
@@ -383,7 +380,7 @@ fun WatchForReports(
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun NormalNote(
|
fun AcceptableNote(
|
||||||
baseNote: Note,
|
baseNote: Note,
|
||||||
routeForLastRead: String? = null,
|
routeForLastRead: String? = null,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
@@ -391,7 +388,6 @@ fun NormalNote(
|
|||||||
isQuotedNote: Boolean = false,
|
isQuotedNote: Boolean = false,
|
||||||
unPackReply: Boolean = true,
|
unPackReply: Boolean = true,
|
||||||
makeItShort: Boolean = false,
|
makeItShort: Boolean = false,
|
||||||
addMarginTop: Boolean = true,
|
|
||||||
canPreview: Boolean = true,
|
canPreview: Boolean = true,
|
||||||
quotesLeft: Int,
|
quotesLeft: Int,
|
||||||
parentBackgroundColor: MutableState<Color>? = null,
|
parentBackgroundColor: MutableState<Color>? = null,
|
||||||
@@ -423,7 +419,6 @@ fun NormalNote(
|
|||||||
isQuotedNote = isQuotedNote,
|
isQuotedNote = isQuotedNote,
|
||||||
unPackReply = unPackReply,
|
unPackReply = unPackReply,
|
||||||
makeItShort = makeItShort,
|
makeItShort = makeItShort,
|
||||||
addMarginTop = addMarginTop,
|
|
||||||
canPreview = canPreview,
|
canPreview = canPreview,
|
||||||
quotesLeft = quotesLeft,
|
quotesLeft = quotesLeft,
|
||||||
parentBackgroundColor = parentBackgroundColor,
|
parentBackgroundColor = parentBackgroundColor,
|
||||||
@@ -460,7 +455,6 @@ fun NormalNote(
|
|||||||
isQuotedNote = isQuotedNote,
|
isQuotedNote = isQuotedNote,
|
||||||
unPackReply = unPackReply,
|
unPackReply = unPackReply,
|
||||||
makeItShort = makeItShort,
|
makeItShort = makeItShort,
|
||||||
addMarginTop = addMarginTop,
|
|
||||||
canPreview = canPreview,
|
canPreview = canPreview,
|
||||||
quotesLeft = quotesLeft,
|
quotesLeft = quotesLeft,
|
||||||
parentBackgroundColor = parentBackgroundColor,
|
parentBackgroundColor = parentBackgroundColor,
|
||||||
@@ -512,7 +506,6 @@ private fun CheckNewAndRenderNote(
|
|||||||
isQuotedNote: Boolean = false,
|
isQuotedNote: Boolean = false,
|
||||||
unPackReply: Boolean = true,
|
unPackReply: Boolean = true,
|
||||||
makeItShort: Boolean = false,
|
makeItShort: Boolean = false,
|
||||||
addMarginTop: Boolean = true,
|
|
||||||
canPreview: Boolean = true,
|
canPreview: Boolean = true,
|
||||||
quotesLeft: Int,
|
quotesLeft: Int,
|
||||||
parentBackgroundColor: MutableState<Color>? = null,
|
parentBackgroundColor: MutableState<Color>? = null,
|
||||||
@@ -541,7 +534,6 @@ private fun CheckNewAndRenderNote(
|
|||||||
backgroundColor = backgroundColor,
|
backgroundColor = backgroundColor,
|
||||||
isBoostedNote = isBoostedNote,
|
isBoostedNote = isBoostedNote,
|
||||||
isQuotedNote = isQuotedNote,
|
isQuotedNote = isQuotedNote,
|
||||||
addMarginTop = addMarginTop,
|
|
||||||
unPackReply = unPackReply,
|
unPackReply = unPackReply,
|
||||||
makeItShort = makeItShort,
|
makeItShort = makeItShort,
|
||||||
canPreview = canPreview,
|
canPreview = canPreview,
|
||||||
@@ -594,7 +586,6 @@ fun InnerNoteWithReactions(
|
|||||||
backgroundColor: MutableState<Color>,
|
backgroundColor: MutableState<Color>,
|
||||||
isBoostedNote: Boolean,
|
isBoostedNote: Boolean,
|
||||||
isQuotedNote: Boolean,
|
isQuotedNote: Boolean,
|
||||||
addMarginTop: Boolean,
|
|
||||||
unPackReply: Boolean,
|
unPackReply: Boolean,
|
||||||
makeItShort: Boolean,
|
makeItShort: Boolean,
|
||||||
canPreview: Boolean,
|
canPreview: Boolean,
|
||||||
@@ -607,10 +598,8 @@ fun InnerNoteWithReactions(
|
|||||||
|
|
||||||
Row(
|
Row(
|
||||||
modifier =
|
modifier =
|
||||||
if (!isBoostedNote && addMarginTop) {
|
if (!isBoostedNote) {
|
||||||
normalWithTopMarginNoteModifier
|
normalWithTopMarginNoteModifier
|
||||||
} else if (!isBoostedNote) {
|
|
||||||
normalNoteModifier
|
|
||||||
} else {
|
} else {
|
||||||
boostedNoteModifier
|
boostedNoteModifier
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -289,7 +289,6 @@ fun NoteCardCompose(
|
|||||||
isQuotedNote: Boolean = false,
|
isQuotedNote: Boolean = false,
|
||||||
unPackReply: Boolean = true,
|
unPackReply: Boolean = true,
|
||||||
makeItShort: Boolean = false,
|
makeItShort: Boolean = false,
|
||||||
addMarginTop: Boolean = true,
|
|
||||||
showHidden: Boolean = false,
|
showHidden: Boolean = false,
|
||||||
parentBackgroundColor: MutableState<Color>? = null,
|
parentBackgroundColor: MutableState<Color>? = null,
|
||||||
accountViewModel: AccountViewModel,
|
accountViewModel: AccountViewModel,
|
||||||
@@ -305,7 +304,6 @@ fun NoteCardCompose(
|
|||||||
isQuotedNote = isQuotedNote,
|
isQuotedNote = isQuotedNote,
|
||||||
unPackReply = unPackReply,
|
unPackReply = unPackReply,
|
||||||
makeItShort = makeItShort,
|
makeItShort = makeItShort,
|
||||||
addMarginTop = addMarginTop,
|
|
||||||
showHidden = showHidden,
|
showHidden = showHidden,
|
||||||
quotesLeft = 3,
|
quotesLeft = 3,
|
||||||
parentBackgroundColor = parentBackgroundColor,
|
parentBackgroundColor = parentBackgroundColor,
|
||||||
|
|||||||
@@ -200,14 +200,6 @@ val imageHeaderBannerSize = Modifier.fillMaxWidth().height(150.dp)
|
|||||||
|
|
||||||
val authorNotePictureForImageHeader = Modifier.size(75.dp).padding(10.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 =
|
val normalWithTopMarginNoteModifier =
|
||||||
Modifier.fillMaxWidth()
|
Modifier.fillMaxWidth()
|
||||||
.padding(
|
.padding(
|
||||||
|
|||||||
Reference in New Issue
Block a user