@@ -54,21 +54,35 @@ extension AppPreferences {
5454 let container = try decoder. container ( keyedBy: CodingKeys . self)
5555 self . enableSourceControl = try container. decodeIfPresent ( Bool . self, forKey: . enableSourceControl) ?? true
5656 self . refreshStatusLocaly = try container. decodeIfPresent ( Bool . self, forKey: . refreshStatusLocaly) ?? true
57- self . fetchRefreshServerStatus = try container. decodeIfPresent ( Bool . self,
58- forKey: . fetchRefreshServerStatus) ?? true
59- self . addRemoveAutomatically = try container. decodeIfPresent ( Bool . self,
60- forKey: . addRemoveAutomatically) ?? true
57+ self . fetchRefreshServerStatus = try container. decodeIfPresent (
58+ Bool . self,
59+ forKey: . fetchRefreshServerStatus
60+ ) ?? true
61+ self . addRemoveAutomatically = try container. decodeIfPresent (
62+ Bool . self,
63+ forKey: . addRemoveAutomatically
64+ ) ?? true
6165 self . selectFilesToCommit = try container. decodeIfPresent ( Bool . self, forKey: . selectFilesToCommit) ?? true
62- self . showSourceControlChanges = try container. decodeIfPresent ( Bool . self,
63- forKey: . showSourceControlChanges) ?? true
64- self . includeUpstreamChanges = try container. decodeIfPresent ( Bool . self,
65- forKey: . includeUpstreamChanges) ?? true
66- self . openFeedbackInBrowser = try container. decodeIfPresent ( Bool . self,
67- forKey: . openFeedbackInBrowser) ?? true
68- self . revisionComparisonLayout = try container. decodeIfPresent ( RevisionComparisonLayout . self,
69- forKey: . revisionComparisonLayout) ?? . localLeft
70- self . controlNavigatorOrder = try container. decodeIfPresent ( ControlNavigatorOrder . self,
71- forKey: . controlNavigatorOrder) ?? . sortByName
66+ self . showSourceControlChanges = try container. decodeIfPresent (
67+ Bool . self,
68+ forKey: . showSourceControlChanges
69+ ) ?? true
70+ self . includeUpstreamChanges = try container. decodeIfPresent (
71+ Bool . self,
72+ forKey: . includeUpstreamChanges
73+ ) ?? true
74+ self . openFeedbackInBrowser = try container. decodeIfPresent (
75+ Bool . self,
76+ forKey: . openFeedbackInBrowser
77+ ) ?? true
78+ self . revisionComparisonLayout = try container. decodeIfPresent (
79+ RevisionComparisonLayout . self,
80+ forKey: . revisionComparisonLayout
81+ ) ?? . localLeft
82+ self . controlNavigatorOrder = try container. decodeIfPresent (
83+ ControlNavigatorOrder . self,
84+ forKey: . controlNavigatorOrder
85+ ) ?? . sortByName
7286 self . defaultBranchName = try container. decodeIfPresent ( String . self, forKey: . defaultBranchName) ?? " main "
7387 }
7488 }
@@ -107,12 +121,18 @@ extension AppPreferences {
107121 let container = try decoder. container ( keyedBy: CodingKeys . self)
108122 self . authorName = try container. decodeIfPresent ( String . self, forKey: . authorName) ?? " "
109123 self . authorEmail = try container. decodeIfPresent ( String . self, forKey: . authorEmail) ?? " "
110- self . ignoredFiles = try container. decodeIfPresent ( [ IgnoredFiles ] . self,
111- forKey: . ignoredFiles) ?? [ ]
112- self . preferRebaseWhenPulling = try container. decodeIfPresent ( Bool . self,
113- forKey: . preferRebaseWhenPulling) ?? false
114- self . showMergeCommitsPerFileLog = try container. decodeIfPresent ( Bool . self,
115- forKey: . showMergeCommitsPerFileLog) ?? false
124+ self . ignoredFiles = try container. decodeIfPresent (
125+ [ IgnoredFiles ] . self,
126+ forKey: . ignoredFiles
127+ ) ?? [ ]
128+ self . preferRebaseWhenPulling = try container. decodeIfPresent (
129+ Bool . self,
130+ forKey: . preferRebaseWhenPulling
131+ ) ?? false
132+ self . showMergeCommitsPerFileLog = try container. decodeIfPresent (
133+ Bool . self,
134+ forKey: . showMergeCommitsPerFileLog
135+ ) ?? false
116136 }
117137 }
118138}
0 commit comments