fix: configure header code not dispatch on UI thread issue

This commit is contained in:
CMK 2022-11-16 22:31:21 +08:00
parent 4d5d9477fc
commit 8b7b6c4067
2 changed files with 2 additions and 0 deletions

View File

@ -130,6 +130,7 @@ extension StatusView {
authorization: authenticationBox.userAuthorization
).singleOutput()
}
.receive(on: DispatchQueue.main)
.sink { completion in
// do nothing
} receiveValue: { [weak self] response in

View File

@ -203,6 +203,7 @@ extension StatusView.ViewModel {
statusView.headerInfoLabel.configure(content: info.header)
statusView.setHeaderDisplay()
case .reply(let info):
assert(Thread.isMainThread)
statusView.headerIconImageView.image = UIImage(systemName: "arrowshape.turn.up.left.fill")
statusView.headerInfoLabel.configure(content: info.header)
statusView.setHeaderDisplay()