From e4cb42089b6bbf0de0766d4ae3f1f077593e784c Mon Sep 17 00:00:00 2001 From: Inhishonor Date: Fri, 21 Feb 2025 10:43:19 -0800 Subject: [PATCH] Clean up code, add strings. Cleaned up comments. Added a getString, to extra.prompt, so that it will be easier to implement in the future. --- .../com/moez/QKSMS/feature/compose/ComposeActivity.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeActivity.kt b/presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeActivity.kt index 053145fa..821eca83 100644 --- a/presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeActivity.kt +++ b/presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeActivity.kt @@ -266,10 +266,6 @@ class ComposeActivity : QkThemedActivity(), ComposeView { viewModel.bindView(this) val isSpeechRecognitionAvailable = isSpeechRecognitionAvailable() if (isSpeechRecognitionAvailable) { - // Speech recognition is available, enable related features - // For example, you might want to show a button to start speech recognition - // startSpeechRecognitionButton.visibility = View.VISIBLE - contentView.layoutTransition = LayoutTransition().apply { disableTransitionType(LayoutTransition.CHANGING) } @@ -677,7 +673,7 @@ class ComposeActivity : QkThemedActivity(), ComposeView { RecognizerIntent.LANGUAGE_MODEL_FREE_FORM ), // include below if want a custom message that the STT can (optionally) display - // .putExtra(RecognizerIntent.EXTRA_PROMPT, "Speak your message") + // .putExtra(RecognizerIntent.EXTRA_PROMPT, getString(R.string.stt_toast_extra_prompt)) ComposeView.SpeechRecognitionRequestCode ) } @@ -840,4 +836,4 @@ class ComposeActivity : QkThemedActivity(), ComposeView { override fun onBackPressed() = backPressedIntent.onNext(Unit) -} \ No newline at end of file +}