many updates

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-04-25 08:28:07 -07:00
parent cb463c6da9
commit ce989450f4
14 changed files with 185 additions and 74 deletions

View File

@@ -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)
}