-
Notifications
You must be signed in to change notification settings - Fork 516
android: move taildrop directory selector out of onboarding #669
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
base: main
Are you sure you want to change the base?
Conversation
Pull Request Revisions
✅ AI review completed for r3 HelpReact with emojis to give feedback on AI-generated reviews:
We'd love to hear from you—reach out anytime at [email protected]. |
} | ||
} | ||
|
||
viewModel.setDirectoryPickerLauncher(directoryPickerLauncher) | ||
appViewModel.setDirectoryPickerLauncher(directoryPickerLauncher) |
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.
In the MainActivity.kt (lines 221-224), you've moved the directory picker launcher assignment from viewModel to appViewModel, but I don't see corresponding changes in the AppViewModel class to handle this functionality. Make sure the method exists in the new class.
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.
The generateNewFilename method in ShareFileHelper.kt currently uses UUID for generating unique filenames. Would using a more user-friendly approach like adding a simple incrementing number (e.g., 'file(1).txt') provide a better user experience for duplicate files?
-ShareFileHelper manages directory readiness; when a file is being shared to the device, it emits a signal to prompt the user to pick a directory -Remove MDM auth key check; there is no longer any need to make assumptions about Taildrop usage, and we only show the directory selector when they are receiving a Taildropped file -Listen for Taildrop receipt in application view model (formerly VpnViewModel, now renamed due to its expanded scope), since Taildrop can occur even without MainActivity TODO: in OSS, SAF mode should be determined by OS, and not by the dir, since the dir may not be set immediately. Updates tailscale/corp#29211 Signed-off-by: kari-ts <[email protected]>
@@ -372,7 +372,7 @@ func (a *App) watchFileOpsChanges() { | |||
a.directFileRoot = newPath | |||
a.backendRestartCh <- struct{}{} | |||
case helper := <-onShareFileHelper: | |||
log.Printf("Got shareFIleHelper") | |||
log.Printf("Got shareFileHelper") |
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.
In backend.go, there's a simple typo fix from 'shareFIleHelper' to 'shareFileHelper' which is good. Consider adding a simple comment before this log statement to describe the purpose of this branch in the select statement for better code maintainability.
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.
In MainView.kt, the WindowInsets access has been changed from WindowInsets.statusBars
to WindowInsets.Companion.statusBars
. This appears to be a regression as the Companion access is typically needed for older Kotlin versions, whereas direct property access is the modern approach. Unless there's a specific compatibility issue, consider reverting to the direct property access.
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.
Needs a rebase and a quick check against the lastest main. I think I probably broke this with some of the temporary 1.84 patches.
-ShareFileHelper manages directory readiness; when a file is being shared to the device, it emits a signal to prompt the user to pick a directory -Remove MDM auth key check; there is no longer any need to make assumptions about Taildrop usage, and we only show the directory selector when they are receiving a Taildropped file -Listen for Taildrop receipt in application view model (formerly VpnViewModel, now renamed due to its expanded scope), since Taildrop can occur even without MainActivity TODO: in OSS, SAF mode should be determined by OS, and not by the dir, since the dir may not be set immediately.
Updates tailscale/corp#29211