aboutsummaryrefslogtreecommitdiff
path: root/Captura/Data/OutputFormatSetting.swift
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2024-09-16 11:07:46 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2024-09-16 11:07:46 +0200
commit505c1e620497828ffb914e05dd76d9ab124f144a (patch)
tree0d93162c4228dbee9e29c35e9f97f58daa5e3eef /Captura/Data/OutputFormatSetting.swift
parent5802c153cae64142d84e3cd5f762939501ee7e53 (diff)
Format the code
Diffstat (limited to 'Captura/Data/OutputFormatSetting.swift')
-rw-r--r--Captura/Data/OutputFormatSetting.swift12
1 files changed, 6 insertions, 6 deletions
diff --git a/Captura/Data/OutputFormatSetting.swift b/Captura/Data/OutputFormatSetting.swift
index fd48f2f..2131caa 100644
--- a/Captura/Data/OutputFormatSetting.swift
+++ b/Captura/Data/OutputFormatSetting.swift
@@ -20,9 +20,9 @@ enum OutputFormatSetting: Int {
case gifOnly = 0
case mp4Only = 1
case all = 2
-
+
init?(_ string: String) {
- switch(string) {
+ switch string {
case "gif":
self = .gifOnly
case "mp4":
@@ -33,17 +33,17 @@ enum OutputFormatSetting: Int {
return nil
}
}
-
+
func shouldSaveGif() -> Bool {
return self == .gifOnly || self == .all
}
-
+
func shouldSaveMp4() -> Bool {
return self == .mp4Only || self == .all
}
-
+
func toString() -> String {
- switch(self) {
+ switch self {
case .gifOnly:
return "gif"
case .mp4Only: