Files
suixinkan_uikit/suixinkan/Common/NotificationName.swift

75 lines
1.9 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// NotificationName.swift
// suixinkan
//
import Foundation
/// `NotificationCenter`
///
enum NotificationName {
private static let prefix = "com.yuanzhixiang.suixinkan."
private static func name(_ suffix: String) -> Notification.Name {
Notification.Name(prefix + suffix)
}
// MARK: - Session
///
static let userDidLogin = name("userDidLogin")
/// 退
static let userDidLogout = name("userDidLogout")
/// Token
static let sessionDidExpire = name("sessionDidExpire")
// MARK: - Scenic
///
static let scenicDidChange = name("scenicDidChange")
// MARK: - User Profile
///
static let userProfileDidUpdate = name("userProfileDidUpdate")
// MARK: - Message
///
static let unreadMessageCountDidChange = name("unreadMessageCountDidChange")
// MARK: - Order
///
static let orderDidUpdate = name("orderDidUpdate")
// MARK: - Task
///
static let taskDidUpdate = name("taskDidUpdate")
// MARK: - Scenic Queue
///
static let scenicQueueDidUpdate = name("scenicQueueDidUpdate")
// MARK: - Voice Call
///
static let voiceCallStateDidChange = name("voiceCallStateDidChange")
}
/// `Notification.userInfo`
enum NotificationUserInfoKey {
static let scenicId = "scenicId"
static let scenicName = "scenicName"
static let orderId = "orderId"
static let taskId = "taskId"
static let unreadCount = "unreadCount"
static let voiceCallState = "voiceCallState"
}