mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-11 17:24:04 +01:00
Use correct queues for user interface elements
This commit is contained in:
parent
34d0142dbc
commit
1e7b71a482
@ -14,7 +14,7 @@ extension RSImage {
|
||||
static let avatarSize = 48
|
||||
|
||||
static func scaledForAvatar(_ data: Data, imageResultBlock: @escaping (RSImage?) -> Void) {
|
||||
DispatchQueue.global().async {
|
||||
DispatchQueue.global(qos: .userInteractive).async {
|
||||
let image = RSImage.scaledForAvatar(data)
|
||||
DispatchQueue.main.async {
|
||||
imageResultBlock(image)
|
||||
|
@ -16,7 +16,7 @@ final class AvatarView: UIView {
|
||||
imageView.image = image
|
||||
|
||||
if self.traitCollection.userInterfaceStyle == .dark {
|
||||
DispatchQueue.global(qos: .background).async {
|
||||
DispatchQueue.global(qos: .userInteractive).async {
|
||||
if self.image?.isDark() ?? false {
|
||||
DispatchQueue.main.async {
|
||||
self.isDisconcernable = false
|
||||
|
Loading…
Reference in New Issue
Block a user