pull/2341/head
kunfei 2 years ago
parent 49e9dfb7a2
commit 273915f337
  1. 2
      app/src/main/java/io/legado/app/help/TTS.kt
  2. 11
      app/src/main/java/io/legado/app/ui/book/read/TextActionMenu.kt

@ -101,7 +101,7 @@ class TTS {
@Deprecated("Deprecated in Java")
override fun onError(utteranceId: String?) {
//Deprecated
}
}

@ -20,6 +20,7 @@ import io.legado.app.base.adapter.RecyclerAdapter
import io.legado.app.constant.PreferKey
import io.legado.app.databinding.ItemTextBinding
import io.legado.app.databinding.PopupActionMenuBinding
import io.legado.app.help.config.AppConfig
import io.legado.app.utils.*
@SuppressLint("RestrictedApi")
@ -180,6 +181,16 @@ class TextActionMenu(private val context: Context, private val callBack: CallBac
}
callBack.onMenuActionFinally()
}
holder.itemView.setOnLongClickListener {
if (AppConfig.contentSelectSpeakMod == 0) {
AppConfig.contentSelectSpeakMod = 1
context.toastOnUi("切换为从选择的地方开始一直朗读")
} else {
AppConfig.contentSelectSpeakMod = 0
context.toastOnUi("切换为朗读选择内容")
}
true
}
}
}

Loading…
Cancel
Save