damus

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

LogoutNotify.swift (471B)


      1 //
      2 //  LogoutNotify.swift
      3 //  damus
      4 //
      5 //  Created by William Casarin on 2023-07-30.
      6 //
      7 
      8 import Foundation
      9 
     10 struct LogoutNotify: Notify {
     11     typealias Payload = ()
     12     var payload: ()
     13 }
     14 
     15 extension NotifyHandler {
     16     static var logout: NotifyHandler<LogoutNotify> {
     17         .init()
     18     }
     19 }
     20 
     21 extension Notifications {
     22     /// Sign out of damus. Goes back to the login screen.
     23     static var logout: Notifications<LogoutNotify> {
     24         .init(.init(payload: ()))
     25     }
     26 }