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