Remove redundant function
contributes to iOS-319
This commit is contained in:
parent
40ec6e94b2
commit
8ee189e3cf
@ -653,7 +653,7 @@ extension ProfileViewController {
|
||||
viewModel.profileAboutViewModel.fields = updatedAccount.mastodonFields
|
||||
}
|
||||
|
||||
if let updatedMe = try? await APIService.shared.authenticatedUserInfo(authenticationBox: viewModel.authenticationBox) {
|
||||
if let updatedMe = try? await APIService.shared.accountInfo(viewModel.authenticationBox) {
|
||||
viewModel.me = updatedMe
|
||||
}
|
||||
|
||||
@ -1096,7 +1096,7 @@ extension ProfileViewController {
|
||||
} else if viewModel.account == viewModel.me {
|
||||
// update my profile
|
||||
Task {
|
||||
if let updatedMe = try? await APIService.shared.authenticatedUserInfo(authenticationBox: viewModel.authenticationBox) {
|
||||
if let updatedMe = try? await APIService.shared.accountInfo(viewModel.authenticationBox) {
|
||||
viewModel.me = updatedMe
|
||||
viewModel.account = updatedMe
|
||||
}
|
||||
|
@ -380,7 +380,7 @@ extension MainTabBarController {
|
||||
guard let authenticationBox else { return }
|
||||
|
||||
Task { @MainActor in
|
||||
let profileResponse = try await APIService.shared.authenticatedUserInfo(authenticationBox: authenticationBox)
|
||||
let profileResponse = try await APIService.shared.accountInfo(authenticationBox)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,13 +12,6 @@ import MastodonCommon
|
||||
import MastodonSDK
|
||||
|
||||
extension APIService {
|
||||
public func authenticatedUserInfo(
|
||||
authenticationBox: MastodonAuthenticationBox
|
||||
) async throws -> Mastodon.Entity.Account {
|
||||
let authenticated = try await accountInfo(authenticationBox)
|
||||
return authenticated
|
||||
}
|
||||
|
||||
public func accountInfo(_ authenticationBox: MastodonAuthenticationBox
|
||||
) async throws -> Mastodon.Entity.Account {
|
||||
let account = try await Mastodon.API.Account.accountInfo(
|
||||
|
Loading…
x
Reference in New Issue
Block a user