mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
desktop: edit previous message with Up arrow (#2841)
This commit is contained in:
committed by
GitHub
parent
105a6afb4b
commit
760282cdfd
+6
-1
@@ -37,6 +37,7 @@ actual fun PlatformTextField(
|
||||
showDeleteTextButton: MutableState<Boolean>,
|
||||
userIsObserver: Boolean,
|
||||
onMessageChange: (String) -> Unit,
|
||||
onUpArrow: () -> Unit,
|
||||
onDone: () -> Unit,
|
||||
) {
|
||||
val cs = composeState.value
|
||||
@@ -83,7 +84,11 @@ actual fun PlatformTextField(
|
||||
onDone()
|
||||
}
|
||||
true
|
||||
} else false
|
||||
} else if (it.key == Key.DirectionUp && it.type == KeyEventType.KeyDown && cs.message.isEmpty()) {
|
||||
onUpArrow()
|
||||
true
|
||||
}
|
||||
else false
|
||||
},
|
||||
cursorBrush = SolidColor(MaterialTheme.colors.secondary),
|
||||
decorationBox = { innerTextField ->
|
||||
|
||||
Reference in New Issue
Block a user