Fix compile issues after resolving merge conflicts

This commit is contained in:
Marcus Kida 2023-11-28 09:55:18 +01:00
parent 03aeb1fa7e
commit 9fed54db1f
No known key found for this signature in database
GPG Key ID: 19FF64E08013CA40
2 changed files with 3 additions and 11 deletions

View File

@ -54,6 +54,7 @@ extension SearchResultSection {
relationship: relationship,
delegate: configuration.userTableViewCellDelegate
)
return cell
case .status(let status):
let cell = tableView.dequeueReusableCell(withIdentifier: String(describing: StatusTableViewCell.self), for: indexPath) as! StatusTableViewCell
configure(

View File

@ -123,10 +123,8 @@ extension SearchResultViewModel.State {
// discard result when state is not Loading
guard stateMachine.currentState is Loading else { return }
//<<<<<<< remove_status
// let userIDs = response.value.accounts.map { $0.id }
// let statusIDs = response.value.statuses.map { MastodonStatus.fromEntity($0) }
//=======
let statusIDs = searchResults.statuses.map { MastodonStatus.fromEntity($0) }
let accounts = searchResults.accounts
let relationships = try await viewModel.context.apiService.relationship(
@ -134,9 +132,6 @@ extension SearchResultViewModel.State {
authenticationBox: viewModel.authContext.mastodonAuthenticationBox
).value
let statusIDs = searchResults.statuses.map { $0.id }
//>>>>>>> develop
let isNoMore = accounts.isEmpty && statusIDs.isEmpty
if viewModel.searchScope == .all || isNoMore {
@ -150,11 +145,9 @@ extension SearchResultViewModel.State {
await viewModel.statusFetchedResultsController.reset()
viewModel.relationships = []
viewModel.accounts = []
//viewModel.statusFetchedResultsController.statusIDs = []
viewModel.hashtags = []
}
viewModel.userFetchedResultsController.append(userIDs: userIDs)
await viewModel.statusFetchedResultsController.appendRecords(statusIDs)
@ -163,8 +156,6 @@ extension SearchResultViewModel.State {
existingRelationships.append(hashtag)
}
viewModel.relationships = existingRelationships
viewModel.statusFetchedResultsController.append(statusIDs: statusIDs)
var existingHashtags = viewModel.hashtags
for hashtag in searchResults.hashtags where !existingHashtags.contains(hashtag) {