pull/1744/head
kunfei 3 years ago
parent df63877a05
commit 3424e52354
  1. 3
      app/src/main/java/io/legado/app/ui/book/read/TextActionMenu.kt
  2. 1
      app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt

@ -25,8 +25,6 @@ import io.legado.app.databinding.PopupActionMenuBinding
import io.legado.app.service.BaseReadAloudService import io.legado.app.service.BaseReadAloudService
import io.legado.app.utils.* import io.legado.app.utils.*
import java.util.*
@SuppressLint("RestrictedApi") @SuppressLint("RestrictedApi")
class TextActionMenu(private val context: Context, private val callBack: CallBack) : class TextActionMenu(private val context: Context, private val callBack: CallBack) :
PopupWindow(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT), PopupWindow(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT),
@ -248,7 +246,6 @@ class TextActionMenu(private val context: Context, private val callBack: CallBac
@Synchronized @Synchronized
override fun onInit(status: Int) { override fun onInit(status: Int) {
if (status == TextToSpeech.SUCCESS) { if (status == TextToSpeech.SUCCESS) {
textToSpeech?.language = Locale.CHINA
ttsInitFinish = true ttsInitFinish = true
readAloud(lastText) readAloud(lastText)
} else { } else {

@ -194,7 +194,6 @@ class ReadRssViewModel(application: Application) : BaseViewModel(application),
@Synchronized @Synchronized
override fun onInit(status: Int) { override fun onInit(status: Int) {
if (status == TextToSpeech.SUCCESS) { if (status == TextToSpeech.SUCCESS) {
textToSpeech?.language = Locale.CHINA
textToSpeech?.setOnUtteranceProgressListener(TTSUtteranceListener()) textToSpeech?.setOnUtteranceProgressListener(TTSUtteranceListener())
ttsInitFinish = true ttsInitFinish = true
play() play()

Loading…
Cancel
Save