pull/1814/head
kunfei 3 years ago
parent 052affa12c
commit fed80c2b88
  1. 8
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
  2. 6
      app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt
  3. 2
      app/src/main/java/io/legado/app/ui/widget/PopupAction.kt

@ -131,17 +131,17 @@ class ReadBookActivity : BaseReadBookActivity(),
private var menu: Menu? = null
private var changeSourceMenu: PopupMenu? = null
private var refreshMenu: PopupMenu? = null
private var autoPageJob: Job? = null
private var backupJob: Job? = null
private var keepScreenJon: Job? = null
val textActionMenu: TextActionMenu by lazy {
TextActionMenu(this, this)
}
override val imagePopupAction: PopupAction by lazy {
private val imagePopupAction: PopupAction by lazy {
PopupAction(this)
}
override val isInitFinish: Boolean get() = viewModel.isInitFinish
override val isScroll: Boolean get() = binding.readView.isScroll
private var keepScreenJon: Job? = null
private var autoPageJob: Job? = null
private var backupJob: Job? = null
override var autoPageProgress = 0
override var isAutoPage = false
override var isShowingSearchResult = false

@ -25,7 +25,6 @@ import io.legado.app.ui.book.read.page.entities.TextChapter
import io.legado.app.ui.book.read.page.entities.TextPos
import io.legado.app.ui.book.read.page.provider.ChapterProvider
import io.legado.app.ui.book.read.page.provider.TextPageFactory
import io.legado.app.ui.widget.PopupAction
import io.legado.app.utils.activity
import io.legado.app.utils.screenshot
import java.text.BreakIterator
@ -207,10 +206,6 @@ class ReadView(context: Context, attrs: AttributeSet) :
if (!pressDown) return true
pressDown = false
if (!isMove) {
if (!longPressed && callBack.imagePopupAction.isShowing) {
callBack.imagePopupAction.dismiss()
return true
}
if (!longPressed && !pressOnTextSelected) {
onSingleTapUp()
return true
@ -544,7 +539,6 @@ class ReadView(context: Context, attrs: AttributeSet) :
val isInitFinish: Boolean
val isAutoPage: Boolean
val autoPageProgress: Int
val imagePopupAction: PopupAction
fun showActionMenu()
fun screenOffTimerStart()
fun showTextActionMenu()

@ -24,7 +24,7 @@ class PopupAction(private val context: Context) :
isTouchable = true
isOutsideTouchable = false
isFocusable = false
isFocusable = true
binding.recyclerView.adapter = adapter
}

Loading…
Cancel
Save