fix: implement instant keyboard dismissal using native API in ChatDetailScreen

This commit is contained in:
k1ngsterr1
2026-02-02 02:49:31 +05:00
parent 78a8bfe6de
commit 330f9e77ed

View File

@@ -796,10 +796,10 @@ fun ChatDetailScreen(
MutableInteractionSource() MutableInteractionSource()
} }
) { ) {
keyboardController // Мгновенное закрытие клавиатуры через нативный API
?.hide() val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
focusManager imm.hideSoftInputFromWindow(view.windowToken, 0)
.clearFocus() focusManager.clearFocus()
onUserProfileClick(user) onUserProfileClick(user)
}, },
contentAlignment = contentAlignment =
@@ -855,10 +855,10 @@ fun ChatDetailScreen(
MutableInteractionSource() MutableInteractionSource()
} }
) { ) {
keyboardController // Мгновенное закрытие клавиатуры через нативный API
?.hide() val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
focusManager imm.hideSoftInputFromWindow(view.windowToken, 0)
.clearFocus() focusManager.clearFocus()
onUserProfileClick(user) onUserProfileClick(user)
} }
) { ) {