Skip to content

Commit 54eb7e7

Browse files
fix: Speech to text button on chat activity not working #2469
1 parent 388d20b commit 54eb7e7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app/src/main/java/org/fossasia/susi/ai/chat/STTfragment.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,17 @@ class STTFragment : Fragment() {
169169
recognizer.setRecognitionListener(listener)
170170
recognizer.startListening(intent)
171171
}
172+
private fun restoreActivityState() {
172173

174+
if ((activity as ChatActivity).recordingThread != null) {
175+
chatPresenter.startHotwordDetection()
176+
}
177+
(activity as ChatActivity).fabsetting.show()
178+
activity?.searchChat?.show()
179+
activity?.voiceSearchChat?.show()
180+
activity?.btnSpeak?.isEnabled = true
181+
activity?.chatSearchInput?.visibility = View.GONE
182+
}
173183
override fun onPause() {
174184
super.onPause()
175185
if (thisActivity is ChatActivity) {

0 commit comments

Comments
 (0)