fix: status poll appearance may delay set issue

This commit is contained in:
CMK 2021-07-07 16:20:07 +08:00
parent e5e9f83a23
commit 2d46f81b2b
1 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ extension PollSection {
cell.pollOptionView.checkmarkImageView.isHidden = true
case .off:
ThemeService.shared.currentTheme
.receive(on: RunLoop.main)
.receive(on: DispatchQueue.main)
.sink { [weak cell] theme in
guard let cell = cell else { return }
cell.pollOptionView.checkmarkBackgroundView.backgroundColor = theme.tertiarySystemBackgroundColor
@ -80,7 +80,7 @@ extension PollSection {
cell.pollOptionView.checkmarkImageView.isHidden = true
case .on:
ThemeService.shared.currentTheme
.receive(on: RunLoop.main)
.receive(on: DispatchQueue.main)
.sink { [weak cell] theme in
guard let cell = cell else { return }
cell.pollOptionView.checkmarkBackgroundView.backgroundColor = theme.tertiarySystemBackgroundColor