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

816 B
Raw Blame
import Combine
import Foundation

extension SettingsStore {
    var fluidIntelligenceInvitationDismissed: Bool {
        get { UserDefaults.standard.bool(forKey: FluidIntelligenceInvitation.dismissedKey) }
        set {
            self.objectWillChange.send()
            UserDefaults.standard.set(newValue, forKey: FluidIntelligenceInvitation.dismissedKey)
        }
    }

    var hasUsedFluidIntelligence: Bool {
        UserDefaults.standard.bool(forKey: FluidIntelligenceInvitation.usedKey)
    }

    func recordFluidIntelligenceUse(output: String) {
        guard !output.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty, !self.hasUsedFluidIntelligence else { return }
        self.objectWillChange.send()
        FluidIntelligenceInvitation.recordSuccess(output: output, defaults: .standard)
    }
}