|
|
@ -236,9 +236,9 @@ class BackupConfigFragment : BasePreferenceFragment(), |
|
|
|
Coroutine.async { |
|
|
|
Coroutine.async { |
|
|
|
Backup.backup(requireContext(), backupPath) |
|
|
|
Backup.backup(requireContext(), backupPath) |
|
|
|
}.onSuccess { |
|
|
|
}.onSuccess { |
|
|
|
activity?.toastOnUi(R.string.backup_success) |
|
|
|
appCtx.toastOnUi(R.string.backup_success) |
|
|
|
}.onError { |
|
|
|
}.onError { |
|
|
|
activity?.toastOnUi(R.string.backup_fail) |
|
|
|
appCtx.toastOnUi(R.string.backup_fail) |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
backupDir.launch(null) |
|
|
|
backupDir.launch(null) |
|
|
@ -258,9 +258,9 @@ class BackupConfigFragment : BasePreferenceFragment(), |
|
|
|
AppConfig.backupPath = path |
|
|
|
AppConfig.backupPath = path |
|
|
|
Backup.backup(requireContext(), path) |
|
|
|
Backup.backup(requireContext(), path) |
|
|
|
}.onSuccess { |
|
|
|
}.onSuccess { |
|
|
|
activity?.toastOnUi(R.string.backup_success) |
|
|
|
appCtx.toastOnUi(R.string.backup_success) |
|
|
|
}.onError { |
|
|
|
}.onError { |
|
|
|
activity?.toastOnUi(R.string.backup_fail) |
|
|
|
appCtx.toastOnUi(R.string.backup_fail) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.request() |
|
|
|
.request() |
|
|
|