mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
Backup pref related fixes.
This commit is contained in:
parent
e0892853a7
commit
bf666f0296
@ -94,7 +94,7 @@
|
||||
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
android:key="pref_backup_enabled"
|
||||
android:key="pref_backup_enabled_v2"
|
||||
android:title="@string/preferences_chats__chat_backups"
|
||||
android:summary="@string/preferences_chats__backup_chats_to_external_storage" />
|
||||
|
||||
@ -102,7 +102,7 @@
|
||||
android:key="pref_backup_create"
|
||||
android:title="@string/preferences_chats__create_backup"
|
||||
android:persistent="false"
|
||||
android:dependency="pref_backup_enabled"
|
||||
android:dependency="pref_backup_enabled_v2"
|
||||
tools:summary="Last backup: 3 days ago" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
@ -40,7 +40,7 @@ object BackupUtil {
|
||||
@Throws(IOException::class)
|
||||
fun enableBackups(context: Context, password: String) {
|
||||
val backupDir = getBackupDirUri(context)
|
||||
if (backupDir == null || validateDirAccess(context, backupDir)) {
|
||||
if (backupDir == null || !validateDirAccess(context, backupDir)) {
|
||||
throw IOException("Backup dir is not set or invalid.")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user