damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

LocalNotificationNotify.swift (549B)


      1 //
      2 //  LocalNotificationNotify.swift
      3 //  damus
      4 //
      5 //  Created by William Casarin on 2023-07-30.
      6 //
      7 
      8 import Foundation
      9 
     10 struct LocalNotificationNotify: Notify {
     11     typealias Payload = LossyLocalNotification
     12     var payload: Payload
     13 }
     14 
     15 extension NotifyHandler {
     16     static var local_notification: NotifyHandler<LocalNotificationNotify> {
     17         .init()
     18     }
     19 }
     20 
     21 extension Notifications {
     22     static func local_notification(_ payload: LossyLocalNotification) -> Notifications<LocalNotificationNotify> {
     23         .init(.init(payload: payload))
     24     }
     25 }