-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
chore: fetch subscription when start #7910
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
Conversation
Reviewer's GuideThis pull request adds logic to fetch and store workspace subscription information when a workspace is initialized or opened, by introducing a new event and handler in the UserWorkspaceBloc. The implementation ensures that subscription info is retrieved and updated in the state as part of the workspace lifecycle. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
What would happen if we are unable to fetch the subscription, say, for self hosters? |
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.
Hey @appflowy - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
frontend/appflowy_flutter/lib/workspace/application/user/user_workspace_bloc.dart
Outdated
Show resolved
Hide resolved
| Emitter<UserWorkspaceState> emit, | ||
| String workspaceId, | ||
| ) async { | ||
| unawaited(UserBackendService.getWorkspaceSubscriptionInfo(workspaceId).fold( |
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.
suggestion (bug_risk): Detached call with unawaited means the function returns before fetch completes
Remove unawaited and await the fold result directly so this function’s Future represents the network call. Alternatively, adjust the caller to not assume _handleFetchWorkspaceSubscriptionInfo covers the fetch lifecycle.
I've added billing check |
Feature Preview
PR Checklist
Summary by Sourcery
Introduce automatic fetching of workspace subscription information during workspace initialization and opening, with corresponding event and state updates in the user workspace BLoC.
New Features:
Enhancements: