forked from zelo72/mastodon-ios
fix: code format
This commit is contained in:
parent
1e5daf5a77
commit
ca320c555a
|
@ -91,7 +91,7 @@ final class MastodonRegisterViewModel {
|
||||||
let query = Mastodon.API.Account.AccountLookupQuery(acct: text)
|
let query = Mastodon.API.Account.AccountLookupQuery(acct: text)
|
||||||
return context.apiService.accountLookup(domain: domain, query: query, authorization: self.applicationAuthorization)
|
return context.apiService.accountLookup(domain: domain, query: query, authorization: self.applicationAuthorization)
|
||||||
.map {
|
.map {
|
||||||
response -> Result<Mastodon.Response.Content<Mastodon.Entity.Account>, Error>in
|
response -> Result<Mastodon.Response.Content<Mastodon.Entity.Account>, Error> in
|
||||||
Result.success(response)
|
Result.success(response)
|
||||||
}
|
}
|
||||||
.catch { error in
|
.catch { error in
|
||||||
|
@ -100,9 +100,7 @@ final class MastodonRegisterViewModel {
|
||||||
.eraseToAnyPublisher()
|
.eraseToAnyPublisher()
|
||||||
}
|
}
|
||||||
.switchToLatest()
|
.switchToLatest()
|
||||||
.sink(receiveCompletion: { _ in
|
.sink { [weak self] result in
|
||||||
|
|
||||||
}, receiveValue: { [weak self] result in
|
|
||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
switch result {
|
switch result {
|
||||||
case .success:
|
case .success:
|
||||||
|
@ -111,7 +109,7 @@ final class MastodonRegisterViewModel {
|
||||||
case .failure:
|
case .failure:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
.store(in: &disposeBag)
|
.store(in: &disposeBag)
|
||||||
|
|
||||||
usernameValidateState
|
usernameValidateState
|
||||||
|
|
Loading…
Reference in New Issue