Adds an option to change reactions from the popup
This commit is contained in:
@@ -31,6 +31,7 @@ import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
|||||||
import androidx.compose.material.icons.automirrored.filled.OpenInNew
|
import androidx.compose.material.icons.automirrored.filled.OpenInNew
|
||||||
import androidx.compose.material.icons.automirrored.filled.VolumeOff
|
import androidx.compose.material.icons.automirrored.filled.VolumeOff
|
||||||
import androidx.compose.material.icons.automirrored.filled.VolumeUp
|
import androidx.compose.material.icons.automirrored.filled.VolumeUp
|
||||||
|
import androidx.compose.material.icons.filled.AddReaction
|
||||||
import androidx.compose.material.icons.filled.Bolt
|
import androidx.compose.material.icons.filled.Bolt
|
||||||
import androidx.compose.material.icons.filled.Cancel
|
import androidx.compose.material.icons.filled.Cancel
|
||||||
import androidx.compose.material.icons.filled.Clear
|
import androidx.compose.material.icons.filled.Clear
|
||||||
@@ -44,6 +45,7 @@ import androidx.compose.material.icons.filled.MoreVert
|
|||||||
import androidx.compose.material.icons.filled.PushPin
|
import androidx.compose.material.icons.filled.PushPin
|
||||||
import androidx.compose.material.icons.filled.Report
|
import androidx.compose.material.icons.filled.Report
|
||||||
import androidx.compose.material.icons.filled.Share
|
import androidx.compose.material.icons.filled.Share
|
||||||
|
import androidx.compose.material.icons.outlined.AddReaction
|
||||||
import androidx.compose.material.icons.outlined.ArrowForwardIos
|
import androidx.compose.material.icons.outlined.ArrowForwardIos
|
||||||
import androidx.compose.material.icons.outlined.Bolt
|
import androidx.compose.material.icons.outlined.Bolt
|
||||||
import androidx.compose.material.icons.outlined.PlayCircle
|
import androidx.compose.material.icons.outlined.PlayCircle
|
||||||
@@ -164,7 +166,20 @@ fun LikedIcon(
|
|||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Liked,
|
imageVector = Liked,
|
||||||
stringRes(id = R.string.like_description),
|
contentDescription = stringRes(id = R.string.like_description),
|
||||||
|
modifier = modifier,
|
||||||
|
tint = tint,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun ChangeReactionIcon(
|
||||||
|
modifier: Modifier,
|
||||||
|
tint: Color = Color.Unspecified,
|
||||||
|
) {
|
||||||
|
Icon(
|
||||||
|
imageVector = Icons.Outlined.AddReaction,
|
||||||
|
contentDescription = stringRes(id = R.string.change_reaction),
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
tint = tint,
|
tint = tint,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -822,7 +822,6 @@ fun BoostText(
|
|||||||
SlidingAnimationCount(boostState, grayTint, accountViewModel)
|
SlidingAnimationCount(boostState, grayTint, accountViewModel)
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalFoundationApi::class)
|
|
||||||
@Composable
|
@Composable
|
||||||
fun LikeReaction(
|
fun LikeReaction(
|
||||||
baseNote: Note,
|
baseNote: Note,
|
||||||
@@ -1367,6 +1366,10 @@ fun ReactionChoicePopupContent(
|
|||||||
toRemove = toRemove,
|
toRemove = toRemove,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ClickableBox(modifier = reactionBox, onClick = onChangeAmount) {
|
||||||
|
ChangeReactionIcon(modifier = Size20Modifier, MaterialTheme.colorScheme.placeholderText)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1389,6 +1392,11 @@ fun ReactionChoicePopupPeeview() {
|
|||||||
"\uD83D\uDE31",
|
"\uD83D\uDE31",
|
||||||
"+",
|
"+",
|
||||||
"-",
|
"-",
|
||||||
|
"\uD83C\uDF89",
|
||||||
|
"\uD83E\uDD14",
|
||||||
|
"\uD83D\uDE31",
|
||||||
|
"\uD83E\uDD14",
|
||||||
|
"\uD83D\uDE31",
|
||||||
),
|
),
|
||||||
onClick = {},
|
onClick = {},
|
||||||
onChangeAmount = {},
|
onChangeAmount = {},
|
||||||
|
|||||||
@@ -785,6 +785,8 @@
|
|||||||
<string name="like_description">Like</string>
|
<string name="like_description">Like</string>
|
||||||
<string name="zap_description">Zap</string>
|
<string name="zap_description">Zap</string>
|
||||||
|
|
||||||
|
<string name="change_reaction">Change Quick Reactions</string>
|
||||||
|
|
||||||
<string name="profile_image_of_user">Profile Picture of %1$s</string>
|
<string name="profile_image_of_user">Profile Picture of %1$s</string>
|
||||||
<string name="relay_info">Relay %1$s</string>
|
<string name="relay_info">Relay %1$s</string>
|
||||||
<string name="expand_relay_list">Expand relay list</string>
|
<string name="expand_relay_list">Expand relay list</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user