From 5b11d6c3c36aae2c72ae646a8cc0358da563d3b0 Mon Sep 17 00:00:00 2001 From: Michele Primavera Date: Mon, 21 Oct 2024 20:48:00 +0200 Subject: [PATCH] Fix missing items from hidden sections --- Ice/MenuBar/ItemManagement/MenuBarItemManager.swift | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Ice/MenuBar/ItemManagement/MenuBarItemManager.swift b/Ice/MenuBar/ItemManagement/MenuBarItemManager.swift index 07888fe..04a2ed1 100644 --- a/Ice/MenuBar/ItemManagement/MenuBarItemManager.swift +++ b/Ice/MenuBar/ItemManagement/MenuBarItemManager.swift @@ -181,9 +181,7 @@ final class MenuBarItemManager: ObservableObject { return } Task { - if(ScreenCapture.cachedCheckPermissions()) { - await self.cacheItemsIfNeeded() - } + await self.cacheItemsIfNeeded() } } .store(in: &c) @@ -195,9 +193,7 @@ final class MenuBarItemManager: ObservableObject { return } Task { - if(ScreenCapture.cachedCheckPermissions()) { - await self.cacheItemsIfNeeded() - } + await self.cacheItemsIfNeeded() } } .store(in: &c) @@ -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 {