|
|
|
@ -65,11 +65,8 @@ import io.legado.app.ui.widget.PopupAction |
|
|
|
|
import io.legado.app.ui.widget.dialog.PhotoDialog |
|
|
|
|
import io.legado.app.ui.widget.dialog.TextDialog |
|
|
|
|
import io.legado.app.utils.* |
|
|
|
|
import kotlinx.coroutines.* |
|
|
|
|
import kotlinx.coroutines.Dispatchers.IO |
|
|
|
|
import kotlinx.coroutines.Job |
|
|
|
|
import kotlinx.coroutines.delay |
|
|
|
|
import kotlinx.coroutines.isActive |
|
|
|
|
import kotlinx.coroutines.launch |
|
|
|
|
|
|
|
|
|
class ReadBookActivity : BaseReadBookActivity(), |
|
|
|
|
View.OnTouchListener, |
|
|
|
@ -1063,9 +1060,11 @@ class ReadBookActivity : BaseReadBookActivity(), |
|
|
|
|
backupJob?.cancel() |
|
|
|
|
backupJob = launch { |
|
|
|
|
delay(120000) |
|
|
|
|
ReadBook.book?.let { |
|
|
|
|
AppWebDav.uploadBookProgress(it) |
|
|
|
|
Backup.autoBack(this@ReadBookActivity) |
|
|
|
|
withContext(IO) { |
|
|
|
|
ReadBook.book?.let { |
|
|
|
|
AppWebDav.uploadBookProgress(it) |
|
|
|
|
Backup.autoBack(this@ReadBookActivity) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|