Skip to content

Commit

Permalink
chore: PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien-coye committed Jun 9, 2023
1 parent 1bfae9c commit d38b883
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Mail/Views/Thread List/ThreadListViewModel+Observation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ extension ThreadListViewModel {
let uid = updatedThread.uid

let threadToUpdate: Thread? = sections.reduce(nil as Thread?) { partialResult, section in
partialResult ?? section.threads.first(where: { $0.uid == uid })
partialResult ?? section.threads.first { $0.uid == uid }
}

let sectionToUpdate = sections.first { section in
(section.threads.first(where: { $0.uid == uid })) != nil
section.threads.contains { $0.uid == uid }
}

guard let threadToUpdate = threadToUpdate,
Expand Down

0 comments on commit d38b883

Please sign in to comment.