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 menu: Menu? = null
private var changeSourceMenu: PopupMenu? = null private var changeSourceMenu: PopupMenu? = null
private var refreshMenu: 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 { val textActionMenu: TextActionMenu by lazy {
TextActionMenu(this, this) TextActionMenu(this, this)
} }
override val imagePopupAction: PopupAction by lazy { private val imagePopupAction: PopupAction by lazy {
PopupAction(this) PopupAction(this)
} }
override val isInitFinish: Boolean get() = viewModel.isInitFinish override val isInitFinish: Boolean get() = viewModel.isInitFinish
override val isScroll: Boolean get() = binding.readView.isScroll 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 autoPageProgress = 0
override var isAutoPage = false override var isAutoPage = false
override var isShowingSearchResult = 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.entities.TextPos
import io.legado.app.ui.book.read.page.provider.ChapterProvider 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.book.read.page.provider.TextPageFactory
import io.legado.app.ui.widget.PopupAction
import io.legado.app.utils.activity import io.legado.app.utils.activity
import io.legado.app.utils.screenshot import io.legado.app.utils.screenshot
import java.text.BreakIterator import java.text.BreakIterator
@ -207,10 +206,6 @@ class ReadView(context: Context, attrs: AttributeSet) :
if (!pressDown) return true if (!pressDown) return true
pressDown = false pressDown = false
if (!isMove) { if (!isMove) {
if (!longPressed && callBack.imagePopupAction.isShowing) {
callBack.imagePopupAction.dismiss()
return true
}
if (!longPressed && !pressOnTextSelected) { if (!longPressed && !pressOnTextSelected) {
onSingleTapUp() onSingleTapUp()
return true return true
@ -544,7 +539,6 @@ class ReadView(context: Context, attrs: AttributeSet) :
val isInitFinish: Boolean val isInitFinish: Boolean
val isAutoPage: Boolean val isAutoPage: Boolean
val autoPageProgress: Int val autoPageProgress: Int
val imagePopupAction: PopupAction
fun showActionMenu() fun showActionMenu()
fun screenOffTimerStart() fun screenOffTimerStart()
fun showTextActionMenu() fun showTextActionMenu()

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

Loading…
Cancel
Save