Skip to content

Commit

Permalink
fix: thumbnails would sometimes be the wrong size
Browse files Browse the repository at this point in the history
  • Loading branch information
decodism authored and lwouis committed Nov 2, 2022
1 parent fd84a9a commit 1065c0d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/logic/Windows.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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() }
}
}
}
Expand Down

0 comments on commit 1065c0d

Please sign in to comment.