@ -174,8 +174,7 @@ abstract class CommonRecyclerAdapter<ITEM, VB : ViewBinding>(protected val conte
val srcPosition = oldPosition + getHeaderCount()
val targetPosition = newPosition + getHeaderCount()
Collections.swap(this.items, srcPosition, targetPosition)
notifyItemChanged(srcPosition)
notifyItemChanged(targetPosition)
notifyItemMoved(srcPosition, targetPosition)
}
@ -90,12 +90,13 @@ object ReadBook {
nextTextChapter = null
fun uploadProgress() {
if (!AppConfig.syncBookProgress) return
fun uploadProgress(syncBookProgress: Boolean = AppConfig.syncBookProgress) {
if (syncBookProgress) {
book?.let {
BookWebDav.uploadBookProgress(it)
fun upReadStartTime() {
Coroutine.async {
@ -162,8 +162,8 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
fun syncBookProgress(book: Book) {
if (!AppConfig.syncBookProgress)
fun syncBookProgress(book: Book, syncBookProgress: Boolean = AppConfig.syncBookProgress) {
if (syncBookProgress)
execute {
BookWebDav.getBookProgress(book)?.let { progress ->
if (progress.durChapterIndex < book.durChapterIndex ||