mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
3846a02923
commit
eb15267aac
@ -45,6 +45,8 @@ object AppWebDav {
|
|||||||
|
|
||||||
val isOk get() = authorization != null
|
val isOk get() = authorization != null
|
||||||
|
|
||||||
|
private val isJianGuoYun get() = rootWebDavUrl.startsWith(defaultWebDavUrl, true)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
runBlocking {
|
runBlocking {
|
||||||
upConfig()
|
upConfig()
|
||||||
@ -109,6 +111,9 @@ object AppWebDav {
|
|||||||
|
|
||||||
suspend fun showRestoreDialog(context: Context) {
|
suspend fun showRestoreDialog(context: Context) {
|
||||||
val names = withContext(IO) { getBackupNames() }
|
val names = withContext(IO) { getBackupNames() }
|
||||||
|
if (isJianGuoYun && names.size > 700) {
|
||||||
|
context.toastOnUi("由于坚果云限制,部分备份可能未显示")
|
||||||
|
}
|
||||||
if (names.isNotEmpty()) {
|
if (names.isNotEmpty()) {
|
||||||
coroutineContext.ensureActive()
|
coroutineContext.ensureActive()
|
||||||
withContext(Main) {
|
withContext(Main) {
|
||||||
|
Loading…
Reference in New Issue
Block a user