-
Notifications
You must be signed in to change notification settings - Fork 66
IOS-5365 implement the async membership handling (simpler approach) #4112
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
IOS-5365 implement the async membership handling (simpler approach) #4112
Conversation
Code ReviewBugs/IssuesMembershipStatusStorage.swift:68-75 - Missing error handling for membership status updates MembershipStatusStorage.swift:38 - Race condition potential Best PracticesMembershipStatusStorage.swift:55 - Property not cleaned up Libraryfile:1 - Non-standard middleware version MembershipCoordinatorModel.swift:29 - Missing initial state fetch Summary: |
| @@ -1 +1 @@ | |||
| MIDDLE_VERSION=v0.44.0-nightly.20251016.1 | |||
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.
we will not merge this pr to develop until there will be proper middleware veriosn
ignatovv
left a comment
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.
blocked until mw nightly build will arrive
| private var membershipService: any MembershipServiceProtocol | ||
| @Injected(\.membershipModelBuilder) | ||
| private var builder: any MembershipModelBuilderProtocol | ||
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 disable "trim whitespace-only lines" in Xcode and rollback all this changes
|
|
||
|
|
||
| nonisolated init() { } |
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.
properties first, methods next. Please move order back
| var currentTiers: [MembershipTier] { _tiers } | ||
| @Published private var _tiers: [MembershipTier] = [] | ||
|
|
||
| private var currentMembershipData: Anytype_Model_Membership? |
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.
Make alias in Service, MembershipStatus.swift file on the top. We don't use the middle names directly. There are big
|
closed in favor of #4111 |
Updated membership data fetching to use middleware cache for faster app startup.
Problem
Middleware now returns cached membership/tiers data immediately (with noCache: false) instead of blocking on network calls. App startup was slow because we were forcing network calls with noCache: true.
Changes
Fast Startup
Event Handling
Approach
Trade-offs
Compare with another PR with bigger refactoring #4111
Pros:
Cons: