From dbe6ba3daf1a48de56009771eab9fc581ad26351 Mon Sep 17 00:00:00 2001 From: Hariharan Mudaliar Date: Thu, 22 Jan 2026 16:15:35 +0530 Subject: [PATCH] Finally Fixed Sneak Peek --- DynamicIsland/ContentView.swift | 2 +- DynamicIsland/DynamicIslandViewCoordinator.swift | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/DynamicIsland/ContentView.swift b/DynamicIsland/ContentView.swift index 7504853..ac091fd 100644 --- a/DynamicIsland/ContentView.swift +++ b/DynamicIsland/ContentView.swift @@ -556,7 +556,7 @@ struct ContentView: View { .frame(width: 76, alignment: .trailing) } .frame(height: vm.effectiveClosedNotchHeight + (isHovering ? 8 : 0), alignment: .center) - } else if coordinator.sneakPeek.show && Defaults[.inlineHUD] && (coordinator.sneakPeek.type != .music) && (coordinator.sneakPeek.type != .battery) && (coordinator.sneakPeek.type != .timer) && (coordinator.sneakPeek.type != .reminder) && (coordinator.sneakPeek.type != .volume || vm.notchState == .closed) { + } else if coordinator.sneakPeek.show && Defaults[.inlineHUD] && (coordinator.sneakPeek.type != .music) && (coordinator.sneakPeek.type != .battery) && (coordinator.sneakPeek.type != .timer) && (coordinator.sneakPeek.type != .reminder) && !coordinator.sneakPeek.type.isExtensionPayload && (coordinator.sneakPeek.type != .volume || vm.notchState == .closed) { InlineHUD(type: $coordinator.sneakPeek.type, value: $coordinator.sneakPeek.value, icon: $coordinator.sneakPeek.icon, hoverAnimation: $isHovering, gestureProgress: $gestureProgress) .transition( coordinator.sneakPeek.type == .capsLock diff --git a/DynamicIsland/DynamicIslandViewCoordinator.swift b/DynamicIsland/DynamicIslandViewCoordinator.swift index c3ec73b..331a256 100644 --- a/DynamicIsland/DynamicIslandViewCoordinator.swift +++ b/DynamicIsland/DynamicIslandViewCoordinator.swift @@ -55,6 +55,15 @@ extension SneakContentType { } } +extension SneakContentType { + var isExtensionPayload: Bool { + if case .extensionLiveActivity = self { + return true + } + return false + } +} + struct sneakPeek { var show: Bool = false var type: SneakContentType = .music