Skip to content

Commit

Permalink
Fix missing items from hidden sections
Browse files Browse the repository at this point in the history
  • Loading branch information
michyprima committed Oct 21, 2024
1 parent 3b60aa2 commit 5b11d6c
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions Ice/MenuBar/ItemManagement/MenuBarItemManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ final class MenuBarItemManager: ObservableObject {
return
}
Task {
if(ScreenCapture.cachedCheckPermissions()) {
await self.cacheItemsIfNeeded()
}
await self.cacheItemsIfNeeded()
}
}
.store(in: &c)
Expand All @@ -195,9 +193,7 @@ final class MenuBarItemManager: ObservableObject {
return
}
Task {
if(ScreenCapture.cachedCheckPermissions()) {
await self.cacheItemsIfNeeded()
}
await self.cacheItemsIfNeeded()
}
}
.store(in: &c)
Expand Down Expand Up @@ -317,11 +313,6 @@ extension MenuBarItemManager {
/// Caches the current menu bar items if needed, ensuring that the control
/// items are in the correct order.
func cacheItemsIfNeeded() async {
guard ScreenCapture.cachedCheckPermissions() else {
logSkippingCache(reason: "Ice not having screen recording permission")
return
}

do {
try await waitForItemsToStopMoving(timeout: .seconds(1))
} catch is TaskTimeoutError {
Expand Down

0 comments on commit 5b11d6c

Please sign in to comment.