chore: remove useless code

This commit is contained in:
sunxiaojian 2021-04-01 11:50:35 +08:00
parent ada6d542f3
commit 0f8e3dafe8
1 changed files with 0 additions and 27 deletions

View File

@ -33,35 +33,8 @@ final class SearchViewModel {
return
}
let trendsAPI = context.apiService.recommendTrends(domain: activeMastodonAuthenticationBox.domain, query: Mastodon.API.Trends.Query(limit: 5))
// .sink { completion in
// switch completion {
// case .failure(let error):
// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: recommendTrends fail: %s", ((#file as NSString).lastPathComponent), #line, #function, error.localizedDescription)
// case .finished:
// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: recommendTrends success", ((#file as NSString).lastPathComponent), #line, #function)
// break
// }
//
// } receiveValue: { [weak self] tags in
// guard let self = self else { return }
// self.recommendHashTags = tags.value
// }
// .store(in: &disposeBag)
let accountsAPI = context.apiService.recommendAccount(domain: activeMastodonAuthenticationBox.domain, query: nil, mastodonAuthenticationBox: activeMastodonAuthenticationBox)
// .sink { completion in
// switch completion {
// case .failure(let error):
// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: recommendAccount fail: %s", ((#file as NSString).lastPathComponent), #line, #function, error.localizedDescription)
// case .finished:
// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: recommendAccount success", ((#file as NSString).lastPathComponent), #line, #function)
// break
// }
// } receiveValue: { [weak self] accounts in
// guard let self = self else { return }
// self.recommendAccounts = accounts.value
// }
// .store(in: &disposeBag)
Publishers.Zip(trendsAPI,accountsAPI)
.sink { completion in
switch completion {