Rename favorites preference
This commit is contained in:
parent
b515041bd9
commit
baff2c58ca
|
@ -34,7 +34,7 @@ final class ProviderFavoritesManager: ObservableObject {
|
||||||
|
|
||||||
var moduleId: UUID {
|
var moduleId: UUID {
|
||||||
didSet {
|
didSet {
|
||||||
guard let rawValue = defaults.string(forKey: AppPreference.moduleFavoriteServers.key) else {
|
guard let rawValue = defaults.string(forKey: AppPreference.providerFavoriteServers.key) else {
|
||||||
allFavorites = ProviderFavoriteServers()
|
allFavorites = ProviderFavoriteServers()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,6 @@ final class ProviderFavoritesManager: ObservableObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
func save() {
|
func save() {
|
||||||
defaults.set(allFavorites.rawValue, forKey: AppPreference.moduleFavoriteServers.key)
|
defaults.set(allFavorites.rawValue, forKey: AppPreference.providerFavoriteServers.key)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,10 +32,10 @@ public enum AppPreference: String {
|
||||||
|
|
||||||
case logsPrivateData
|
case logsPrivateData
|
||||||
|
|
||||||
case moduleFavoriteServers
|
|
||||||
|
|
||||||
case profilesLayout
|
case profilesLayout
|
||||||
|
|
||||||
|
case providerFavoriteServers
|
||||||
|
|
||||||
public var key: String {
|
public var key: String {
|
||||||
"App.\(rawValue)"
|
"App.\(rawValue)"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue