mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-06-12 21:27:47 +02:00
chore: update dependencies
Signed-off-by: rhunk <101876869+rhunk@users.noreply.github.com>
This commit is contained in:
@ -259,7 +259,7 @@ class BulkMessagingAction : AbstractAction() {
|
||||
onExpandedChange = { filterMenuExpanded = it },
|
||||
) {
|
||||
ElevatedCard(
|
||||
modifier = Modifier.menuAnchor()
|
||||
modifier = Modifier.menuAnchor(MenuAnchorType.PrimaryNotEditable)
|
||||
) {
|
||||
Text(text = filter.name, modifier = Modifier.padding(5.dp))
|
||||
}
|
||||
@ -286,7 +286,7 @@ class BulkMessagingAction : AbstractAction() {
|
||||
onExpandedChange = { sortMenuExpanded = it },
|
||||
) {
|
||||
ElevatedCard(
|
||||
modifier = Modifier.menuAnchor()
|
||||
modifier = Modifier.menuAnchor(MenuAnchorType.PrimaryNotEditable)
|
||||
) {
|
||||
Text(text = "Sort by", modifier = Modifier.padding(5.dp))
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ class ExportChatMessages : AbstractAction() {
|
||||
onValueChange = {},
|
||||
readOnly = true,
|
||||
singleLine = true,
|
||||
modifier = Modifier.menuAnchor()
|
||||
modifier = Modifier.menuAnchor(MenuAnchorType.PrimaryNotEditable)
|
||||
)
|
||||
|
||||
ExposedDropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {
|
||||
@ -159,7 +159,7 @@ class ExportChatMessages : AbstractAction() {
|
||||
value = exportType.extension,
|
||||
onValueChange = {},
|
||||
readOnly = true,
|
||||
modifier = Modifier.menuAnchor()
|
||||
modifier = Modifier.menuAnchor(MenuAnchorType.PrimaryNotEditable)
|
||||
)
|
||||
|
||||
ExposedDropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {
|
||||
@ -188,7 +188,7 @@ class ExportChatMessages : AbstractAction() {
|
||||
} ?: exporterTranslation["text_field_selection_all"],
|
||||
onValueChange = {},
|
||||
readOnly = true,
|
||||
modifier = Modifier.menuAnchor()
|
||||
modifier = Modifier.menuAnchor(MenuAnchorType.PrimaryNotEditable)
|
||||
)
|
||||
|
||||
ExposedDropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {
|
||||
|
@ -47,9 +47,9 @@ class ManageFriendList : AbstractAction() {
|
||||
null,
|
||||
friendRelationshipChangerInstance,
|
||||
userId,
|
||||
addFriend.parameterTypes[2].enumConstants.first { it.toString() == "ADDED_BY_USERNAME" },
|
||||
addFriend.parameterTypes[3].enumConstants.first { it.toString() == "SEARCH" },
|
||||
addFriend.parameterTypes[4].enumConstants.first { it.toString() == "SEARCH" },
|
||||
addFriend.parameterTypes[2].enumConstants!!.first { it.toString() == "ADDED_BY_USERNAME" },
|
||||
addFriend.parameterTypes[3].enumConstants!!.first { it.toString() == "SEARCH" },
|
||||
addFriend.parameterTypes[4].enumConstants!!.first { it.toString() == "SEARCH" },
|
||||
0
|
||||
)
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ class MediaUploadQualityOverride : Feature("Media Upload Quality Override") {
|
||||
mediaQualityLevelProviderMethod.getAsString()!!,
|
||||
HookStage.BEFORE
|
||||
) { param ->
|
||||
param.setResult((param.method() as Method).returnType.enumConstants.firstOrNull { it.toString() == "LEVEL_MAX" } )
|
||||
param.setResult((param.method() as Method).returnType.enumConstants!!.firstOrNull { it.toString() == "LEVEL_MAX" } )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import androidx.compose.animation.core.Animatable
|
||||
import androidx.compose.animation.core.LinearEasing
|
||||
import androidx.compose.animation.core.animateFloatAsState
|
||||
import androidx.compose.animation.core.tween
|
||||
import androidx.compose.animation.rememberSplineBasedDecay
|
||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||
import androidx.compose.foundation.gestures.AnchoredDraggableState
|
||||
import androidx.compose.foundation.gestures.DraggableAnchors
|
||||
@ -157,26 +158,25 @@ class InAppOverlay(
|
||||
}
|
||||
|
||||
val deviceWidth = LocalContext.current.resources.displayMetrics.widthPixels
|
||||
val delayAnimationSpec = rememberSplineBasedDecay<Float>()
|
||||
val draggableState = remember {
|
||||
AnchoredDraggableState(
|
||||
initialValue = 0,
|
||||
anchors = DraggableAnchors {
|
||||
-1 at -deviceWidth.toFloat()
|
||||
0 at 0f
|
||||
1 at deviceWidth.toFloat()
|
||||
},
|
||||
positionalThreshold = { distance: Float -> distance * 0.5f },
|
||||
velocityThreshold = { deviceWidth / 2f },
|
||||
animationSpec = tween(),
|
||||
snapAnimationSpec = tween(),
|
||||
decayAnimationSpec = delayAnimationSpec,
|
||||
confirmValueChange = {
|
||||
if (it == 0) return@AnchoredDraggableState true
|
||||
toast.visible = false
|
||||
true
|
||||
}
|
||||
).apply {
|
||||
updateAnchors(
|
||||
DraggableAnchors {
|
||||
-1 at -deviceWidth.toFloat()
|
||||
0 at 0f
|
||||
1 at deviceWidth.toFloat()
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Box(
|
||||
|
@ -43,7 +43,7 @@ class ConversationManager(
|
||||
instanceNonNull(),
|
||||
SnapUUID(conversationId).instanceNonNull(),
|
||||
messageId,
|
||||
context.classCache.messageUpdateEnum.enumConstants.first { it.toString() == action.toString() },
|
||||
context.classCache.messageUpdateEnum.enumConstants!!.first { it.toString() == action.toString() },
|
||||
CallbackBuilder(getCallbackClass("Callback"))
|
||||
.override("onSuccess") { onResult(null) }
|
||||
.override("onError") { onResult(it.arg<Any>(0).toString()) }.build()
|
||||
|
Reference in New Issue
Block a user