-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
save backup at user selected path #99
base: dev
Are you sure you want to change the base?
Conversation
features/backup/src/main/java/ir/mehdiyari/krypt/backup/DataComponents.kt
Outdated
Show resolved
Hide resolved
val context = LocalContext.current | ||
|
||
var selectedDirectory: DocumentFile? by remember { mutableStateOf(null) } | ||
val launcher = rememberLauncherForActivityResult( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you please rename this variable to something more meaningful based on the job of the variable?
if (backupJob == null) { | ||
backupJob = viewModelScope.launch(ioDispatcher) { | ||
_backupViewState.emit(BackupViewState.Started) | ||
try { | ||
if (backupRepository.backupAll()) { | ||
if (backupRepository.backupAll(uri)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use uri to path
inside view model, if we do this, there is no need to depend the data layer to the android related classes.
Hey @am-ghaseminia, Please also test the whole flow with different scenarios like changing the state of the app to foreground and background, screen orientation, etc. |
I tested the flow and I found this issue.
|
- Passing path instead of Uri
@mehdiyari jan, you are right about the first one, but about the second one, maybe user wants to have backup in different folders. did you consider this too? |
Hey @am-ghaseminia, any update about this PR? |
Description and Impact
Please include a summary of the changes and the related issue. Please also have relevant motivation and context.
Type of change
Result