Merge remote-tracking branch 'origin/master'

pull/2718/head
kunfei 2 years ago
commit 2bf66c5031
  1. 5
      app/src/main/java/io/legado/app/help/AppWebDav.kt
  2. 2
      app/src/main/java/io/legado/app/lib/permission/Permissions.kt

@ -45,6 +45,8 @@ object AppWebDav {
val isOk get() = authorization != null
private val isJianGuoYun get() = rootWebDavUrl.startsWith(defaultWebDavUrl, true)
init {
runBlocking {
upConfig()
@ -109,6 +111,9 @@ object AppWebDav {
suspend fun showRestoreDialog(context: Context) {
val names = withContext(IO) { getBackupNames() }
if (isJianGuoYun && names.size > 700) {
context.toastOnUi("由于坚果云限制,部分备份可能未显示")
}
if (names.isNotEmpty()) {
coroutineContext.ensureActive()
withContext(Main) {

@ -42,7 +42,7 @@ object Permissions {
const val ACCESS_MEDIA_LOCATION = "android.permission.ACCESS_MEDIA_LOCATION"
object Group {
val STORAGE = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
val STORAGE = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
arrayOf(MANAGE_EXTERNAL_STORAGE)
} else {
arrayOf(READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE)

Loading…
Cancel
Save