@@ -25,12 +25,24 @@ extension Notification.Name {
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var reply: Notification.Name {
|
||||
return Notification.Name("reply")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var switched_timeline: Notification.Name {
|
||||
return Notification.Name("switched_timeline")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var click_profile_pic: Notification.Name {
|
||||
return Notification.Name("click_profile_pic")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var scroll_to_top: Notification.Name {
|
||||
return Notification.Name("scroll_to_to")
|
||||
@@ -54,3 +66,17 @@ extension Notification.Name {
|
||||
return Notification.Name("send post")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var boost: Notification.Name {
|
||||
return Notification.Name("boost post")
|
||||
}
|
||||
}
|
||||
|
||||
func handle_notify(_ name: Notification.Name) -> NotificationCenter.Publisher {
|
||||
return NotificationCenter.default.publisher(for: name)
|
||||
}
|
||||
|
||||
func notify(_ name: NSNotification.Name, _ object: Any?) {
|
||||
NotificationCenter.default.post(name: name, object: object)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user