Try to fall back to showing URI for storage location if concrete file path isn't available
Closes #9977 (cherry picked from commit 0c860c0fe99f2a9b18065e36a35cc46fad265da6)
This commit is contained in:
parent
e4c229aa3b
commit
66a04c4757
@ -107,7 +107,8 @@ object SettingsDataScreen : SearchableSettings {
|
|||||||
return Preference.PreferenceItem.TextPreference(
|
return Preference.PreferenceItem.TextPreference(
|
||||||
title = stringResource(MR.strings.pref_storage_location),
|
title = stringResource(MR.strings.pref_storage_location),
|
||||||
subtitle = remember(storageDir) {
|
subtitle = remember(storageDir) {
|
||||||
(UniFile.fromUri(context, storageDir.toUri())?.filePath)
|
val file = UniFile.fromUri(context, storageDir.toUri())
|
||||||
|
file?.filePath ?: file?.uri?.toString()
|
||||||
} ?: stringResource(MR.strings.invalid_location, storageDir),
|
} ?: stringResource(MR.strings.invalid_location, storageDir),
|
||||||
onClick = {
|
onClick = {
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user