Skip to content

Commit 3d26d40

Browse files
authored
fix: prevent keyboard from showing up keyboard in short code threads (#567)
1 parent 365778a commit 3d26d40

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/kotlin/org/fossify/messages/activities/ThreadActivity.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ class ThreadActivity : SimpleActivity() {
453453
setupAdapter()
454454

455455
runOnUiThread {
456-
if (messages.isEmpty()) {
456+
if (messages.isEmpty() && !isSpecialNumber()) {
457457
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
458458
binding.messageHolder.threadTypeMessage.requestFocus()
459459
}
@@ -981,6 +981,8 @@ class ThreadActivity : SimpleActivity() {
981981

982982
private fun maybeDisableShortCodeReply() {
983983
if (isSpecialNumber() && !isRecycleBin) {
984+
currentFocus?.clearFocus()
985+
hideKeyboard()
984986
binding.messageHolder.threadTypeMessage.text?.clear()
985987
binding.messageHolder.root.beGone()
986988
binding.shortCodeHolder.root.beVisible()

0 commit comments

Comments
 (0)