mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-11 09:14:06 +01:00
Change how Notification names were defined to match our current convention
This commit is contained in:
parent
281e41dd2d
commit
a645ac9458
@ -14,8 +14,10 @@ import UIKit
|
||||
|
||||
import RSCore
|
||||
|
||||
let ArticleThemeNamesDidChangeNotification = "ArticleThemeNamesDidChangeNotification"
|
||||
let CurrentArticleThemeDidChangeNotification = "CurrentArticleThemeDidChangeNotification"
|
||||
public extension Notification.Name {
|
||||
static let ArticleThemeNamesDidChangeNotification = Notification.Name("ArticleThemeNamesDidChangeNotification")
|
||||
static let CurrentArticleThemeDidChangeNotification = Notification.Name("CurrentArticleThemeDidChangeNotification")
|
||||
}
|
||||
|
||||
final class ArticleThemesManager {
|
||||
|
||||
@ -35,13 +37,13 @@ final class ArticleThemesManager {
|
||||
|
||||
var currentTheme: ArticleTheme {
|
||||
didSet {
|
||||
NotificationCenter.default.post(name: Notification.Name(rawValue: CurrentArticleThemeDidChangeNotification), object: self)
|
||||
NotificationCenter.default.post(name: .CurrentArticleThemeDidChangeNotification, object: self)
|
||||
}
|
||||
}
|
||||
|
||||
var themeNames = [AppDefaults.defaultThemeName] {
|
||||
didSet {
|
||||
NotificationCenter.default.post(name: Notification.Name(rawValue: ArticleThemeNamesDidChangeNotification), object: self)
|
||||
NotificationCenter.default.post(name: .ArticleThemeNamesDidChangeNotification, object: self)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user