This commit is contained in:
Михаил Капелько
2024-01-06 18:35:45 +03:00
parent f3807b76f6
commit 676a1ada17
7 changed files with 24 additions and 70 deletions

View File

@@ -8,18 +8,10 @@ extension BusUI {
public init(
_ textApp: String,
_ textUI: String,
_ id: String? = nil
_ textUI: String
) {
var ka = textApp
var ku = textUI
if let id {
ka = ka + id
ku = ku + id
}
Bus.sendSync(
ku,
textUI,
$v
.removeDuplicates()
.compactMap(onlyUIText)
@@ -28,7 +20,7 @@ extension BusUI {
)
Bus.receiveSync(
[ka],
[textApp],
{ [weak self] (_, v: String) in self?.v = "a:\(v)" },
&subscriptions
)