|
|
@@ -2,23 +2,26 @@ import Combine |
|
|
|
import SwiftUI |
|
|
|
|
|
|
|
final class VM: ObservableObject { |
|
|
|
/* |
|
|
|
@Published var text = "a:" |
|
|
|
let format = Bus.Processor( |
|
|
|
MeetupId.K.meetupIdTextUI.rawValue, |
|
|
|
MeetupId.K.meetupIdTextApp.rawValue, |
|
|
|
MeetupId.onlyFormat |
|
|
|
) |
|
|
|
*/ |
|
|
|
var isJoinAvailable = true |
|
|
|
let join = PassthroughSubject<Void, Never>() |
|
|
|
var subscriptions = [AnyCancellable]() |
|
|
|
|
|
|
|
init() { |
|
|
|
/* |
|
|
|
Bus.send( |
|
|
|
MeetupId.K.meetupIdTextUI.rawValue, |
|
|
|
$text |
|
|
|
// Исключаем конфликты от UI и App путём игнорирования спама. |
|
|
|
.debounce(for: .seconds(0.3), scheduler: DispatchQueue.main) |
|
|
|
.compactMap(onlyAcceptUIText) |
|
|
|
.compactMap(onlyUIText) |
|
|
|
.eraseToAnyPublisher(), |
|
|
|
sub: &subscriptions |
|
|
|
) |
|
|
@@ -29,5 +32,6 @@ final class VM: ObservableObject { |
|
|
|
opt: [.async], |
|
|
|
sub: &subscriptions |
|
|
|
) |
|
|
|
*/ |
|
|
|
} |
|
|
|
} |