parent
c6788f5a43
commit
b8ba69b930
|
@ -56,7 +56,6 @@ extension DataSourceFacade {
|
|||
) async {
|
||||
provider.coordinator.showLoading()
|
||||
|
||||
Task {
|
||||
do {
|
||||
guard let account = try await provider.context.apiService.fetchUser(
|
||||
username: username,
|
||||
|
@ -73,7 +72,6 @@ extension DataSourceFacade {
|
|||
provider.coordinator.hideLoading()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
static func coordinateToProfileScene(
|
||||
|
@ -83,7 +81,6 @@ extension DataSourceFacade {
|
|||
) async {
|
||||
provider.coordinator.showLoading()
|
||||
|
||||
Task {
|
||||
do {
|
||||
let account = try await provider.context.apiService.accountInfo(
|
||||
domain: domain,
|
||||
|
@ -98,7 +95,6 @@ extension DataSourceFacade {
|
|||
provider.coordinator.hideLoading()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
public static func coordinateToProfileScene(
|
||||
|
|
|
@ -142,13 +142,12 @@ class MastodonLoginViewController: UIViewController, NeedsDependency {
|
|||
|
||||
authenticationViewModel
|
||||
.authenticated.sink { (domain, account) in
|
||||
Task {
|
||||
Task { @MainActor in
|
||||
do {
|
||||
_ = try await self.context.authenticationService.activeMastodonUser(domain: domain, userID: account.id)
|
||||
FileManager.default.store(account: account, forUserID: MastodonUserIdentifier(domain: domain, userID: account.id))
|
||||
Task { @MainActor in
|
||||
|
||||
self.coordinator.setup()
|
||||
}
|
||||
} catch {
|
||||
assertionFailure(error.localizedDescription)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue