Skip to content

Commit

Permalink
IOS-2456 Drop membership cache upon login
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatovv committed Apr 1, 2024
1 parent 7c23d56 commit 2022371
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Anytype/Sources/ServiceLayer/Auth/LoginStateService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ final class LoginStateService: LoginStateServiceProtocol {
private var middlewareConfigurationProvider: MiddlewareConfigurationProviderProtocol
@Injected(\.blockWidgetExpandedService)
private var blockWidgetExpandedService: BlockWidgetExpandedServiceProtocol
@Injected(\.membershipService)
private var membershipService: MembershipServiceProtocol
@Injected(\.relationDetailsStorage)
private var relationDetailsStorage: RelationDetailsStorageProtocol
@Injected(\.workspaceStorage)
Expand All @@ -37,6 +39,8 @@ final class LoginStateService: LoginStateServiceProtocol {

func setupStateAfterLoginOrAuth(account: AccountData) async {
middlewareConfigurationProvider.setupConfiguration(account: account)
_ = try? await membershipService.getTiers(noCache: true) // To update cache

await startSubscriptions()
}

Expand Down

0 comments on commit 2022371

Please sign in to comment.