Skip to content

Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more

fix: keep silent login fallback inactive

altic-devcf6cd23f272c
diff --git a/Sources/Fluid/AppDelegate.swift b/Sources/Fluid/AppDelegate.swift
index b4312269..942759fb 100644
--- a/Sources/Fluid/AppDelegate.swift
+++ b/Sources/Fluid/AppDelegate.swift
@@ -15,6 +15,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
private var updateCheckTimer: Timer?
private var didRevealMainWindowOnLaunch = false
private var didRequestMainWindowReopen = false
+ private var shouldSuppressNextReopenActivation = false
private var wasLaunchedAsLoginItem = false
func applicationDidFinishLaunching(_ notification: Notification) {
@@ -74,6 +75,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
}
func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {
+ if self.shouldSuppressNextReopenActivation {
+ self.shouldSuppressNextReopenActivation = false
+ return true
+ }
+
// Ensure dock-icon reopen always foregrounds FluidVoice.
sender.activate(ignoringOtherApps: true)
@@ -184,6 +190,12 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
let configuration = NSWorkspace.OpenConfiguration()
configuration.activates = activate
+ if !activate {
+ self.shouldSuppressNextReopenActivation = true
+ DispatchQueue.main.asyncAfter(deadline: .now() + 2) { [weak self] in
+ self?.shouldSuppressNextReopenActivation = false
+ }
+ }
DebugLogger.shared.info("Requesting LaunchServices reopen to create SwiftUI main window", source: "AppDelegate")
NSWorkspace.shared.openApplication(at: Bundle.main.bundleURL, configuration: configuration) { _, error in