|
|
@ -52,6 +52,8 @@ class BackupConfigFragment : BasePreferenceFragment(), |
|
|
|
Backup.backup(appCtx, uri.toString()) |
|
|
|
Backup.backup(appCtx, uri.toString()) |
|
|
|
}.onSuccess { |
|
|
|
}.onSuccess { |
|
|
|
appCtx.toastOnUi(R.string.backup_success) |
|
|
|
appCtx.toastOnUi(R.string.backup_success) |
|
|
|
|
|
|
|
}.onError { |
|
|
|
|
|
|
|
appCtx.toastOnUi(R.string.backup_fail) |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
uri.path?.let { path -> |
|
|
|
uri.path?.let { path -> |
|
|
@ -60,6 +62,8 @@ class BackupConfigFragment : BasePreferenceFragment(), |
|
|
|
Backup.backup(appCtx, path) |
|
|
|
Backup.backup(appCtx, path) |
|
|
|
}.onSuccess { |
|
|
|
}.onSuccess { |
|
|
|
appCtx.toastOnUi(R.string.backup_success) |
|
|
|
appCtx.toastOnUi(R.string.backup_success) |
|
|
|
|
|
|
|
}.onError { |
|
|
|
|
|
|
|
appCtx.toastOnUi(R.string.backup_fail) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -231,6 +235,8 @@ class BackupConfigFragment : BasePreferenceFragment(), |
|
|
|
Backup.backup(requireContext(), backupPath) |
|
|
|
Backup.backup(requireContext(), backupPath) |
|
|
|
}.onSuccess { |
|
|
|
}.onSuccess { |
|
|
|
toastOnUi(R.string.backup_success) |
|
|
|
toastOnUi(R.string.backup_success) |
|
|
|
|
|
|
|
}.onError { |
|
|
|
|
|
|
|
toastOnUi(R.string.backup_fail) |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
backupDir.launch(null) |
|
|
|
backupDir.launch(null) |
|
|
@ -251,6 +257,8 @@ class BackupConfigFragment : BasePreferenceFragment(), |
|
|
|
Backup.backup(requireContext(), path) |
|
|
|
Backup.backup(requireContext(), path) |
|
|
|
}.onSuccess { |
|
|
|
}.onSuccess { |
|
|
|
toastOnUi(R.string.backup_success) |
|
|
|
toastOnUi(R.string.backup_success) |
|
|
|
|
|
|
|
}.onError { |
|
|
|
|
|
|
|
toastOnUi(R.string.backup_fail) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.request() |
|
|
|
.request() |
|
|
|