mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-29 00:03:24 +02:00
Fixes the padding of the reaction row on quotes
This commit is contained in:
@@ -506,6 +506,7 @@ fun InnerNoteWithReactions(
|
|||||||
ReactionsRow(
|
ReactionsRow(
|
||||||
baseNote = baseNote,
|
baseNote = baseNote,
|
||||||
showReactionDetail = notBoostedNorQuote,
|
showReactionDetail = notBoostedNorQuote,
|
||||||
|
addPadding = !isBoostedNote,
|
||||||
editState = editState,
|
editState = editState,
|
||||||
accountViewModel = accountViewModel,
|
accountViewModel = accountViewModel,
|
||||||
nav = nav,
|
nav = nav,
|
||||||
|
@@ -147,6 +147,7 @@ import kotlin.math.roundToInt
|
|||||||
fun ReactionsRow(
|
fun ReactionsRow(
|
||||||
baseNote: Note,
|
baseNote: Note,
|
||||||
showReactionDetail: Boolean,
|
showReactionDetail: Boolean,
|
||||||
|
addPadding: Boolean,
|
||||||
editState: State<GenericLoadable<EditState>>,
|
editState: State<GenericLoadable<EditState>>,
|
||||||
accountViewModel: AccountViewModel,
|
accountViewModel: AccountViewModel,
|
||||||
nav: (String) -> Unit,
|
nav: (String) -> Unit,
|
||||||
@@ -155,7 +156,7 @@ fun ReactionsRow(
|
|||||||
|
|
||||||
Spacer(modifier = HalfDoubleVertSpacer)
|
Spacer(modifier = HalfDoubleVertSpacer)
|
||||||
|
|
||||||
InnerReactionRow(baseNote, showReactionDetail, wantsToSeeReactions, editState, accountViewModel, nav)
|
InnerReactionRow(baseNote, showReactionDetail, addPadding, wantsToSeeReactions, editState, accountViewModel, nav)
|
||||||
|
|
||||||
Spacer(modifier = HalfDoubleVertSpacer)
|
Spacer(modifier = HalfDoubleVertSpacer)
|
||||||
|
|
||||||
@@ -171,6 +172,7 @@ fun ReactionsRow(
|
|||||||
private fun InnerReactionRow(
|
private fun InnerReactionRow(
|
||||||
baseNote: Note,
|
baseNote: Note,
|
||||||
showReactionDetail: Boolean,
|
showReactionDetail: Boolean,
|
||||||
|
addPadding: Boolean,
|
||||||
wantsToSeeReactions: MutableState<Boolean>,
|
wantsToSeeReactions: MutableState<Boolean>,
|
||||||
editState: State<GenericLoadable<EditState>>,
|
editState: State<GenericLoadable<EditState>>,
|
||||||
accountViewModel: AccountViewModel,
|
accountViewModel: AccountViewModel,
|
||||||
@@ -178,6 +180,7 @@ private fun InnerReactionRow(
|
|||||||
) {
|
) {
|
||||||
GenericInnerReactionRow(
|
GenericInnerReactionRow(
|
||||||
showReactionDetail = showReactionDetail,
|
showReactionDetail = showReactionDetail,
|
||||||
|
addPadding = addPadding,
|
||||||
one = {
|
one = {
|
||||||
WatchReactionsZapsBoostsAndDisplayIfExists(baseNote) {
|
WatchReactionsZapsBoostsAndDisplayIfExists(baseNote) {
|
||||||
RenderShowIndividualReactionsButton(wantsToSeeReactions)
|
RenderShowIndividualReactionsButton(wantsToSeeReactions)
|
||||||
@@ -219,6 +222,7 @@ private fun InnerReactionRow(
|
|||||||
@Composable
|
@Composable
|
||||||
private fun GenericInnerReactionRow(
|
private fun GenericInnerReactionRow(
|
||||||
showReactionDetail: Boolean,
|
showReactionDetail: Boolean,
|
||||||
|
addPadding: Boolean,
|
||||||
one: @Composable () -> Unit,
|
one: @Composable () -> Unit,
|
||||||
two: @Composable () -> Unit,
|
two: @Composable () -> Unit,
|
||||||
three: @Composable () -> Unit,
|
three: @Composable () -> Unit,
|
||||||
@@ -229,7 +233,7 @@ private fun GenericInnerReactionRow(
|
|||||||
Row(
|
Row(
|
||||||
verticalAlignment = CenterVertically,
|
verticalAlignment = CenterVertically,
|
||||||
horizontalArrangement = RowColSpacing,
|
horizontalArrangement = RowColSpacing,
|
||||||
modifier = if (showReactionDetail) ReactionRowHeightWithPadding else ReactionRowHeight,
|
modifier = if (addPadding) ReactionRowHeightWithPadding else ReactionRowHeight,
|
||||||
) {
|
) {
|
||||||
if (showReactionDetail) {
|
if (showReactionDetail) {
|
||||||
Row(
|
Row(
|
||||||
|
@@ -651,7 +651,7 @@ fun NoteMaster(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ReactionsRow(note, true, editState, accountViewModel, nav)
|
ReactionsRow(note, true, true, editState, accountViewModel, nav)
|
||||||
}
|
}
|
||||||
|
|
||||||
NoteQuickActionMenu(
|
NoteQuickActionMenu(
|
||||||
|
Reference in New Issue
Block a user