feat: recording capsule visible in fullscreen and clicking doesnt focus main window (#46)

This commit is contained in:
Owen Gretzinger
2025-07-25 17:31:20 -04:00
committed by GitHub
parent c8f52cdb1f
commit 2136563428
2 changed files with 53 additions and 54 deletions
-27
View File
@@ -44,19 +44,7 @@ struct MeetingnotesApp: App {
CommandGroup(after: .appInfo) {
CheckForUpdatesView(updater: updaterController.updater)
}
// Hidden command group that handles audio level window notifications
CommandGroup(after: .windowArrangement) {
ShowAudioLevelsCommand()
}
}
// Floating Audio Level Window
Window("", id: "audio-levels") {
AudioLevelWindowView()
}
.windowStyle(.plain)
.windowResizability(.contentSize)
.defaultPosition(.trailing)
}
}
@@ -70,18 +58,3 @@ struct CheckForUpdatesView: View {
.keyboardShortcut("u", modifiers: .command)
}
}
struct ShowAudioLevelsCommand: View {
@Environment(\.openWindow) private var openWindow
var body: some View {
// Empty view - we only need this for the notification observer
EmptyView()
.onReceive(NotificationCenter.default.publisher(for: .openAudioLevelWindow)) { _ in
openWindow(id: "audio-levels")
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
AudioLevelWindowManager.shared.showWindow()
}
}
}
}