]> git.r.bdr.sh - rbdr/captura/blob - Captura/Data/CapturaSettings.swift
Add clipboard
[rbdr/captura] / Captura / Data / CapturaSettings.swift
1 import Foundation
2
3 struct CapturaSettings {
4 static var frameRate: Int {
5 UserDefaults.standard.integer(forKey: "frameRate")
6 }
7
8 static var outputFormats: OutputFormatSetting {
9 OutputFormatSetting(rawValue: UserDefaults.standard.integer(forKey: "outputFormats")) ?? .all
10 }
11
12 static var shouldSaveMp4: Bool {
13 outputFormats.shouldSaveMp4()
14 }
15
16 static var shouldSaveGif: Bool {
17 outputFormats.shouldSaveGif()
18 }
19
20
21 static var shouldSendNotifications: Bool {
22 get {
23 UserDefaults.standard.bool(forKey: "shouldSendNotifications")
24 }
25 set {
26 UserDefaults.standard.setValue(newValue, forKey: "shouldSendNotifications")
27 }
28 }
29 }