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