优化
This commit is contained in:
@@ -312,8 +312,6 @@ class ReadBookActivity : BaseReadBookActivity(),
|
|||||||
upSystemUiVisibility()
|
upSystemUiVisibility()
|
||||||
if (hasFocus) {
|
if (hasFocus) {
|
||||||
binding.readMenu.upBrightnessState()
|
binding.readMenu.upBrightnessState()
|
||||||
} else if (!menuLayoutIsVisible) {
|
|
||||||
ReadBook.cancelPreDownloadTask()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -323,6 +321,12 @@ class ReadBookActivity : BaseReadBookActivity(),
|
|||||||
binding.readView.upStatusBar()
|
binding.readView.upStatusBar()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onTopResumedActivityChanged(isTopResumedActivity: Boolean) {
|
||||||
|
if (!isTopResumedActivity) {
|
||||||
|
ReadBook.cancelPreDownloadTask()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressLint("UnspecifiedRegisterReceiverFlag")
|
@SuppressLint("UnspecifiedRegisterReceiverFlag")
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
@@ -358,7 +362,6 @@ class ReadBookActivity : BaseReadBookActivity(),
|
|||||||
autoPageStop()
|
autoPageStop()
|
||||||
backupJob?.cancel()
|
backupJob?.cancel()
|
||||||
ReadBook.saveRead()
|
ReadBook.saveRead()
|
||||||
ReadBook.cancelPreDownloadTask()
|
|
||||||
unregisterReceiver(timeBatteryReceiver)
|
unregisterReceiver(timeBatteryReceiver)
|
||||||
upSystemUiVisibility()
|
upSystemUiVisibility()
|
||||||
if (!BuildConfig.DEBUG) {
|
if (!BuildConfig.DEBUG) {
|
||||||
|
|||||||
Reference in New Issue
Block a user