Update SttDialog.kt
This commit is contained in:
		| @ -53,7 +53,6 @@ class SttDialog : DialogFragment() { | |||||||
|                             partialResultsTextView?.text = result |                             partialResultsTextView?.text = result | ||||||
|                             for (player in players) { |                             for (player in players) { | ||||||
|                                 if (player.pattern?.matcher(result)?.find() == true) { |                                 if (player.pattern?.matcher(result)?.find() == true) { | ||||||
|                                     stt?.stopListening() |  | ||||||
|                                     dismiss() |                                     dismiss() | ||||||
|                                     updateScore(player) |                                     updateScore(player) | ||||||
|                                     updateUI() |                                     updateUI() | ||||||
| @ -77,7 +76,7 @@ class SttDialog : DialogFragment() { | |||||||
|             muteAudio() |             muteAudio() | ||||||
|             stt?.destroy() |             stt?.destroy() | ||||||
|             stt = SpeechRecognizer.createSpeechRecognizer(activity).apply { |             stt = SpeechRecognizer.createSpeechRecognizer(activity).apply { | ||||||
|                 setRecognitionListener(SttListener()) |                 setRecognitionListener(this@SttListener) | ||||||
|                 startListening(sttIntent) |                 startListening(sttIntent) | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| @ -116,7 +115,6 @@ class SttDialog : DialogFragment() { | |||||||
|                             showPopUp(R.string.STT_unavailable) |                             showPopUp(R.string.STT_unavailable) | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|                     muteAudio() |  | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user