Skip to content

Commit

Permalink
fix: Speech to text button on chat activity not working fossasia#2469
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamkumar1739 committed Feb 7, 2020
1 parent 388d20b commit 54eb7e7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/src/main/java/org/fossasia/susi/ai/chat/STTfragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,17 @@ class STTFragment : Fragment() {
recognizer.setRecognitionListener(listener)
recognizer.startListening(intent)
}
private fun restoreActivityState() {

if ((activity as ChatActivity).recordingThread != null) {
chatPresenter.startHotwordDetection()
}
(activity as ChatActivity).fabsetting.show()
activity?.searchChat?.show()
activity?.voiceSearchChat?.show()
activity?.btnSpeak?.isEnabled = true
activity?.chatSearchInput?.visibility = View.GONE
}
override fun onPause() {
super.onPause()
if (thisActivity is ChatActivity) {
Expand Down

0 comments on commit 54eb7e7

Please sign in to comment.