优化
This commit is contained in:
@@ -107,15 +107,15 @@ class FileAssociationActivity :
|
|||||||
intent.data?.let { data ->
|
intent.data?.let { data ->
|
||||||
if (data.isContentScheme()) {
|
if (data.isContentScheme()) {
|
||||||
viewModel.dispatchIndent(data)
|
viewModel.dispatchIndent(data)
|
||||||
} else if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q) {
|
} else {
|
||||||
PermissionsCompat.Builder(this)
|
PermissionsCompat.Builder(this)
|
||||||
.addPermissions(*Permissions.Group.STORAGE)
|
.addPermissions(*Permissions.Group.STORAGE)
|
||||||
.rationale(R.string.tip_perm_request_storage)
|
.rationale(R.string.tip_perm_request_storage)
|
||||||
.onGranted {
|
.onGranted {
|
||||||
viewModel.dispatchIndent(data)
|
viewModel.dispatchIndent(data)
|
||||||
|
}.onDenied {
|
||||||
|
toastOnUi("请求存储权限失败。")
|
||||||
}.request()
|
}.request()
|
||||||
} else {
|
|
||||||
toastOnUi("由于安卓系统限制,请使用系统文件管理重新打开。")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1304,7 +1304,9 @@ class ReadBookActivity : BaseReadBookActivity(),
|
|||||||
popupAction.dismiss()
|
popupAction.dismiss()
|
||||||
binding.readView.onDestroy()
|
binding.readView.onDestroy()
|
||||||
ReadBook.msg = null
|
ReadBook.msg = null
|
||||||
ReadBook.callBack = null
|
if (ReadBook.callBack === this) {
|
||||||
|
ReadBook.callBack = null
|
||||||
|
}
|
||||||
if (!BuildConfig.DEBUG) {
|
if (!BuildConfig.DEBUG) {
|
||||||
Backup.autoBack(this)
|
Backup.autoBack(this)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user