mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Little fix
This commit is contained in:
parent
9f9c774985
commit
ba4fef9443
3 changed files with 6 additions and 3 deletions
|
@ -787,7 +787,7 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
||||||
nav_rail?.itemActiveIndicatorColor = rippleColor
|
nav_rail?.itemActiveIndicatorColor = rippleColor
|
||||||
nav_view?.itemActiveIndicatorColor = rippleColor
|
nav_view?.itemActiveIndicatorColor = rippleColor
|
||||||
|
|
||||||
if (!checkWrite() && Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
|
if (!checkWrite()) {
|
||||||
requestRW()
|
requestRW()
|
||||||
if (checkWrite()) return
|
if (checkWrite()) return
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,7 +148,7 @@ object BackupUtils {
|
||||||
@SuppressLint("SimpleDateFormat")
|
@SuppressLint("SimpleDateFormat")
|
||||||
fun FragmentActivity.backup() {
|
fun FragmentActivity.backup() {
|
||||||
try {
|
try {
|
||||||
if (!checkWrite() && Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
|
if (!checkWrite()) {
|
||||||
showToast(this, getString(R.string.backup_failed), Toast.LENGTH_LONG)
|
showToast(this, getString(R.string.backup_failed), Toast.LENGTH_LONG)
|
||||||
requestRW()
|
requestRW()
|
||||||
return
|
return
|
||||||
|
|
|
@ -57,7 +57,10 @@ object UIHelper {
|
||||||
this,
|
this,
|
||||||
Manifest.permission.WRITE_EXTERNAL_STORAGE
|
Manifest.permission.WRITE_EXTERNAL_STORAGE
|
||||||
)
|
)
|
||||||
== PackageManager.PERMISSION_GRANTED)
|
== PackageManager.PERMISSION_GRANTED
|
||||||
|
// Since Android 13, we can't request external storage permission,
|
||||||
|
// so don't check it.
|
||||||
|
|| Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Activity.requestRW() {
|
fun Activity.requestRW() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue