fix: thumbnails would sometimes be the wrong size

This commit is contained in:
decodism authored and Louis Pontoise committed 2022-11-02 19:14:34 +01:00
1 parent fd84a9a5fc
commit 1065c0d440
1 file changed
+2 -9
+2 -9
View File
@@ -202,17 +202,10 @@ class Windows {
let window = list[currentIndex]
if window.shouldShowTheUser && !window.isWindowlessApp {
window.refreshThumbnail()
DispatchQueue.main.async {
let view = ThumbnailsView.recycledViews[currentIndex]
if view.thumbnail.image != window.thumbnail {
let oldSize = view.thumbnail.frame.size
view.thumbnail.image = window.thumbnail
view.thumbnail.image?.size = oldSize
view.thumbnail.frame.size = oldSize
}
}
}
refreshThumbnailsAsync(screen, currentIndex + 1)
} else {
DispatchQueue.main.async { App.app.refreshOpenUi() }
}
}
}