|
|
@ -69,6 +69,7 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config) { |
|
|
|
if (doc?.canWrite() == true) { |
|
|
|
if (doc?.canWrite() == true) { |
|
|
|
launch { |
|
|
|
launch { |
|
|
|
Backup.backup(requireContext(), uri) |
|
|
|
Backup.backup(requireContext(), uri) |
|
|
|
|
|
|
|
toast(R.string.backup_success) |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
selectBackupFolder() |
|
|
|
selectBackupFolder() |
|
|
@ -90,6 +91,7 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config) { |
|
|
|
.onGranted { |
|
|
|
.onGranted { |
|
|
|
launch { |
|
|
|
launch { |
|
|
|
Backup.backup(requireContext(), null) |
|
|
|
Backup.backup(requireContext(), null) |
|
|
|
|
|
|
|
toast(R.string.backup_success) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.request() |
|
|
|
.request() |
|
|
@ -147,6 +149,7 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config) { |
|
|
|
putPrefString(PreferKey.backupPath, uri.toString()) |
|
|
|
putPrefString(PreferKey.backupPath, uri.toString()) |
|
|
|
launch { |
|
|
|
launch { |
|
|
|
Backup.backup(requireContext(), uri) |
|
|
|
Backup.backup(requireContext(), uri) |
|
|
|
|
|
|
|
toast(R.string.backup_success) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|