From 3d26d40d72142a6fb0541285d1d37f217e1d3b9e Mon Sep 17 00:00:00 2001 From: Naveen Singh <36371707+naveensingh@users.noreply.github.com> Date: Sat, 18 Oct 2025 14:47:59 +0530 Subject: [PATCH] fix: prevent keyboard from showing up keyboard in short code threads (#567) --- .../kotlin/org/fossify/messages/activities/ThreadActivity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/org/fossify/messages/activities/ThreadActivity.kt b/app/src/main/kotlin/org/fossify/messages/activities/ThreadActivity.kt index b616dcd2..43a301f5 100644 --- a/app/src/main/kotlin/org/fossify/messages/activities/ThreadActivity.kt +++ b/app/src/main/kotlin/org/fossify/messages/activities/ThreadActivity.kt @@ -453,7 +453,7 @@ class ThreadActivity : SimpleActivity() { setupAdapter() runOnUiThread { - if (messages.isEmpty()) { + if (messages.isEmpty() && !isSpecialNumber()) { window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE) binding.messageHolder.threadTypeMessage.requestFocus() } @@ -981,6 +981,8 @@ class ThreadActivity : SimpleActivity() { private fun maybeDisableShortCodeReply() { if (isSpecialNumber() && !isRecycleBin) { + currentFocus?.clearFocus() + hideKeyboard() binding.messageHolder.threadTypeMessage.text?.clear() binding.messageHolder.root.beGone() binding.shortCodeHolder.root.beVisible()