|
|
@ -140,6 +140,10 @@ class ReadBookActivity : ReadBookBaseActivity(), |
|
|
|
upMenu() |
|
|
|
upMenu() |
|
|
|
upView() |
|
|
|
upView() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun onPostCreate(savedInstanceState: Bundle?) { |
|
|
|
|
|
|
|
super.onPostCreate(savedInstanceState) |
|
|
|
viewModel.initData(intent) |
|
|
|
viewModel.initData(intent) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -589,7 +593,7 @@ class ReadBookActivity : ReadBookBaseActivity(), |
|
|
|
resetPageOffset: Boolean, |
|
|
|
resetPageOffset: Boolean, |
|
|
|
success: (() -> Unit)? |
|
|
|
success: (() -> Unit)? |
|
|
|
) { |
|
|
|
) { |
|
|
|
runOnUI { |
|
|
|
launch { |
|
|
|
autoPageProgress = 0 |
|
|
|
autoPageProgress = 0 |
|
|
|
binding.readView.upContent(relativePosition, resetPageOffset) |
|
|
|
binding.readView.upContent(relativePosition, resetPageOffset) |
|
|
|
binding.readMenu.setSeekPage(ReadBook.durPageIndex()) |
|
|
|
binding.readMenu.setSeekPage(ReadBook.durPageIndex()) |
|
|
@ -602,13 +606,13 @@ class ReadBookActivity : ReadBookBaseActivity(), |
|
|
|
* 更新视图 |
|
|
|
* 更新视图 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
override fun upView() { |
|
|
|
override fun upView() { |
|
|
|
runOnUI { |
|
|
|
launch { |
|
|
|
binding.readMenu.upBookView() |
|
|
|
binding.readMenu.upBookView() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun upPageAnim() { |
|
|
|
override fun upPageAnim() { |
|
|
|
runOnUI { |
|
|
|
launch { |
|
|
|
binding.readView.upPageAnim() |
|
|
|
binding.readView.upPageAnim() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -617,7 +621,7 @@ class ReadBookActivity : ReadBookBaseActivity(), |
|
|
|
* 页面改变 |
|
|
|
* 页面改变 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
override fun pageChanged() { |
|
|
|
override fun pageChanged() { |
|
|
|
runOnUI { |
|
|
|
launch { |
|
|
|
autoPageProgress = 0 |
|
|
|
autoPageProgress = 0 |
|
|
|
binding.readMenu.setSeekPage(ReadBook.durPageIndex()) |
|
|
|
binding.readMenu.setSeekPage(ReadBook.durPageIndex()) |
|
|
|
mHandler.postDelayed(backupRunnable, 600000) |
|
|
|
mHandler.postDelayed(backupRunnable, 600000) |
|
|
|