Files
iOS/Sources/Shared/Notifications/NotificationCommands/HandlerHideCamera.swift
2026-06-02 22:32:08 +02:00

25 lines
668 B
Swift

#if os(iOS)
import Foundation
import PromiseKit
struct HandlerHideCamera: NotificationCommandHandler {
func handle(_ payload: [String: Any]) -> Promise<Void> {
Promise<Void> { seal in
let postNotification = {
NotificationCenter.default.post(
name: NotificationCommandManager.didReceiveHideCameraNotification,
object: nil
)
seal.fulfill(())
}
if Thread.isMainThread {
postNotification()
} else {
DispatchQueue.main.async(execute: postNotification)
}
}
}
}
#endif