Files
suixinkan_ios_new/suixinkan/Features/Payment/Services/PaymentPushEventCenter.swift
汉秋 3dcfb99254 对齐 Android 立即收款页面 UI,并补齐推送状态与语音开关。
统一收款详情布局、设置金额弹窗和收款记录样式,接入 type 6/1 推送驱动与轮询 fallback,使 iOS 收款反馈与 Android 一致。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 15:17:09 +08:00

36 lines
905 B
Swift
Raw Permalink 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.

//
// PaymentPushEventCenter.swift
// suixinkan
//
// Created by Codex on 2026/6/29.
//
import Combine
import Foundation
/// Android PushBus
struct PaymentPushEvent: Equatable, Sendable {
let type: Int
let dataJSON: String?
}
@MainActor
/// PushNotificationManager
final class PaymentPushEventCenter {
static let shared = PaymentPushEventCenter()
private let subject = PassthroughSubject<PaymentPushEvent, Never>()
private init() {}
///
var events: AnyPublisher<PaymentPushEvent, Never> {
subject.eraseToAnyPublisher()
}
///
func post(type: Int, dataJSON: String?) {
subject.send(PaymentPushEvent(type: type, dataJSON: dataJSON))
}
}