Skip to content

Commit 93a0f23

Browse files
committed
fix: resolve menu bar window, onboarding mic stuck, and debug bundle ID
conflicts
1 parent d2fa1d9 commit 93a0f23

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

Wave/Views/OnboardingView.swift

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import SwiftUI
2+
import Combine
23

34
struct OnboardingView: View {
45
@Environment(AppState.self) private var appState
56
@State private var step = 0
7+
@State private var micGranted = PermissionService.isMicrophoneAuthorized()
8+
@State private var accessibilityGranted = PermissionService.isAccessibilityGranted()
69

710
var body: some View {
811
VStack(spacing: 0) {
@@ -64,15 +67,15 @@ struct OnboardingView: View {
6467
.multilineTextAlignment(.center)
6568
.foregroundStyle(.secondary)
6669
HStack(spacing: 12) {
67-
if PermissionService.isMicrophoneAuthorized() {
70+
if micGranted {
6871
Label("Granted", systemImage: "checkmark.circle.fill")
6972
.foregroundStyle(.green)
7073
Button("Next") { step = 2 }
7174
.buttonStyle(.borderedProminent)
7275
} else {
7376
Button("Grant Access") {
7477
Task {
75-
_ = await PermissionService.requestMicrophoneAccess()
78+
micGranted = await PermissionService.requestMicrophoneAccess()
7679
}
7780
}
7881
.buttonStyle(.borderedProminent)
@@ -95,7 +98,7 @@ struct OnboardingView: View {
9598
.multilineTextAlignment(.center)
9699
.foregroundStyle(.secondary)
97100
HStack(spacing: 12) {
98-
if PermissionService.isAccessibilityGranted() {
101+
if accessibilityGranted {
99102
Label("Granted", systemImage: "checkmark.circle.fill")
100103
.foregroundStyle(.green)
101104
Button("Next") { step = 3 }
@@ -110,6 +113,9 @@ struct OnboardingView: View {
110113
}
111114
}
112115
.controlSize(.large)
116+
.onReceive(Timer.publish(every: 1, on: .main, in: .common).autoconnect()) { _ in
117+
accessibilityGranted = PermissionService.isAccessibilityGranted()
118+
}
113119
}
114120
}
115121

Wave/waveApp.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,10 @@ struct WaveApp: App {
5353
Divider()
5454

5555
Button("Settings...") {
56-
// Show the window immediately (it already exists, just hidden)
57-
let win = NSApp.windows.first(where: { !($0 is NSPanel) })
58-
win?.makeKeyAndOrderFront(nil)
59-
if win == nil { openWindow(id: "main") }
56+
openWindow(id: "main")
6057
NSApp.activate(ignoringOtherApps: true)
61-
// Re-activate after the menu finishes closing (~menu animation duration)
6258
DispatchQueue.main.asyncAfter(deadline: .now() + 0.15) {
6359
NSApp.activate(ignoringOtherApps: true)
64-
NSApp.windows.first(where: { !($0 is NSPanel) })?.makeKeyAndOrderFront(nil)
6560
}
6661
}
6762
.keyboardShortcut(",", modifiers: .command)

0 commit comments

Comments
 (0)