-
Notifications
You must be signed in to change notification settings - Fork 67
DROID-3696 Invite link | Onboarding flow with a no approval invite link #2469
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
DROID-3696 Invite link | Onboarding flow with a no approval invite link #2469
Conversation
# Conflicts: # app/src/main/java/com/anytypeio/anytype/di/feature/MainEntryDI.kt # app/src/main/java/com/anytypeio/anytype/di/main/SubscriptionsModule.kt # presentation/src/main/java/com/anytypeio/anytype/presentation/main/MainViewModel.kt # presentation/src/main/java/com/anytypeio/anytype/presentation/main/MainViewModelFactory.kt
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.
Pull Request Overview
This PR implements the invite link onboarding flow with support for no approval invite links by introducing a new PendingIntentStore to manage pending deep links.
- Injects PendingIntentStore into various view models and factories.
- Refactors deep link handling methods (e.g., renaming onNewDeepLink to handleNewDeepLink, onGoToTheAppClicked to handleAppEntryClick).
- Cleans up deprecated and redundant imports across DI modules and view models.
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
presentation/src/main/java/com/anytypeio/anytype/presentation/vault/VaultViewModel.kt | Adds pending deep link processing and updates injection parameters. |
presentation/src/main/java/com/anytypeio/anytype/presentation/onboarding/signup/OnboardingSetProfileNameViewModel.kt | Injects PendingIntentStore and updates navigation logic for deep links. |
presentation/src/main/java/com/anytypeio/anytype/presentation/onboarding/signup/OnboardingMnemonicViewModel.kt | Refactors deep link and analytics handling. |
presentation/src/main/java/com/anytypeio/anytype/presentation/main/MainViewModelFactory.kt | Adds PendingIntentStore injection to the factory. |
presentation/src/main/java/com/anytypeio/anytype/presentation/main/MainViewModel.kt | Updates methods for deep link processing and renames functions for clarity. |
domain/src/main/java/com/anytypeio/anytype/domain/deeplink/PendingIntentStore.kt | Introduces a new store for managing pending invite deep links. |
app/src/main/java/com/anytypeio/anytype/ui/vault/VaultFragment.kt | Triggers pending deep link processing on resume. |
App and DI files | Update imports & dependency injections to support the new deep link flow. |
Comments suppressed due to low confidence (1)
presentation/src/main/java/com/anytypeio/anytype/presentation/main/MainViewModel.kt:327
- The new deep link handling logic is well-structured; ensure that the error logging in the failure branch of checkAuthorizationStatus is adequately covered in tests.
if (authStatus == AuthStatus.UNAUTHORIZED && deeplink is DeepLinkResolver.Action.Invite) {
@@ -261,6 +260,17 @@ class VaultViewModel( | |||
} | |||
} | |||
|
|||
fun processPendingDeeplink() { | |||
viewModelScope.launch { | |||
delay(1000) // Simulate some delay |
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.
Consider extracting the magic number '1000' used in the delay into a named constant to improve maintainability and clarify its purpose.
delay(1000) // Simulate some delay | |
delay(DELAY_MILLISECONDS) // Simulate some delay |
Copilot uses AI. Check for mistakes.
Description
What type of PR is this? (check all applicable)
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?