This commit is contained in:
Михаил Капелько
2023-12-31 10:33:48 +03:00
parent 0f76c99c95
commit 37b4955bf4
7 changed files with 77 additions and 88 deletions

View File

@@ -12,19 +12,19 @@ extension MeetupId {
_ src: String,
_ dst: String
) {
Bus.receive(
Bus.receiveSync(
[src],
{ [weak self] _, v in self?.v.send(v) },
sub: &subscriptions
&subscriptions
)
Bus.send(
Bus.sendSync(
dst,
v
.debounce(for: .seconds(sec), scheduler: DispatchQueue.main)
.compactMap { (v: Src) in handler(v) }
.eraseToAnyPublisher(),
sub: &subscriptions
&subscriptions
)
}
}

View File

@@ -12,19 +12,19 @@ extension MeetupId {
_ src: String,
_ dst: String
) {
Bus.receive(
Bus.receiveSync(
[src],
{ [weak self] _, v in self?.v.send(v) },
sub: &subscriptions
&subscriptions
)
Bus.send(
Bus.sendSync(
dst,
v
.delay(for: .seconds(sec), scheduler: DispatchQueue.main)
.compactMap { (v: Src) in handler(v) }
.eraseToAnyPublisher(),
sub: &subscriptions
&subscriptions
)
}
}