Skip to content

Commit 0b17a37

Browse files
committed
Rename .loadUserSettings() with .listAvailableSettings()
1 parent 17032a1 commit 0b17a37

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

CotEditor/Sources/Setting Managers/ReplacementManager.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ import URLUtils
5555

5656
private init() {
5757

58-
self.settingNames = self.loadUserSettings()
58+
self.settingNames = self.listAvailableSettings()
5959
}
6060

6161

@@ -130,8 +130,8 @@ import URLUtils
130130
}
131131

132132

133-
/// Loads the list of settings in the user domain.
134-
nonisolated func loadUserSettings() -> [String] {
133+
/// Builds the list of available settings by considering both user and bundled settings.
134+
nonisolated func listAvailableSettings() -> [String] {
135135

136136
self.userSettingFileURLs
137137
.map(Self.settingName(from:))

CotEditor/Sources/Setting Managers/SettingFileManaging.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ extension URL {
108108
/// Loads a setting from a persisted representation.
109109
nonisolated static func loadSetting(from persistent: any Persistable, type: UTType) throws -> sending Setting
110110

111-
/// Loads the list of settings in the user domain.
112-
nonisolated func loadUserSettings() -> [String]
111+
/// Builds the list of available settings by considering both user and bundled settings.
112+
nonisolated func listAvailableSettings() -> [String]
113113

114114
/// Notifies the manager that a setting was updated.
115115
func didUpdateSetting(change: SettingChange)
@@ -436,7 +436,7 @@ extension SettingFileManaging {
436436

437437
self.cachedSettings.removeAll()
438438
self.settingNames = await Task.detached {
439-
self.loadUserSettings()
439+
self.listAvailableSettings()
440440
}.value
441441
}
442442

CotEditor/Sources/Setting Managers/SyntaxManager.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ enum SyntaxName {
8787
try? self.sanitizeUserSettings()
8888

8989
// cache user syntaxes
90-
self.settingNames = self.loadUserSettings()
90+
self.settingNames = self.listAvailableSettings()
9191
self.updateMappingTable()
9292
}
9393

@@ -263,8 +263,8 @@ enum SyntaxName {
263263
}
264264

265265

266-
/// Loads the list of settings in the user domain.
267-
nonisolated func loadUserSettings() -> [SettingName] {
266+
/// Builds the list of available settings by considering both user and bundled settings.
267+
nonisolated func listAvailableSettings() -> [SettingName] {
268268

269269
let userSettingNames = self.userSettingFileURLs
270270
.map(Self.settingName(from:))

CotEditor/Sources/Setting Managers/ThemeManager.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ import URLUtils
6262
.sorted(using: .localizedStandard)
6363

6464
// cache user setting names
65-
self.settingNames = self.loadUserSettings()
65+
self.settingNames = self.listAvailableSettings()
6666
}
6767

6868

@@ -205,8 +205,8 @@ import URLUtils
205205
}
206206

207207

208-
/// Loads the list of settings in the user domain.
209-
nonisolated func loadUserSettings() -> [String] {
208+
/// Builds the list of available settings by considering both user and bundled settings.
209+
nonisolated func listAvailableSettings() -> [String] {
210210

211211
let userSettingNames = self.userSettingFileURLs
212212
.map(Self.settingName(from:))

0 commit comments

Comments
 (0)