From 1d1e235d990ae43f482b65b88ffcfec382986449 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 28 Jan 2024 18:23:37 +0300 Subject: [PATCH] d --- Modules/MicX/Mic/Mic.yml | 2 +- src/App.swift | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Modules/MicX/Mic/Mic.yml b/Modules/MicX/Mic/Mic.yml index eae0bd4..e86185a 100644 --- a/Modules/MicX/Mic/Mic.yml +++ b/Modules/MicX/Mic/Mic.yml @@ -6,7 +6,7 @@ model: service: actions: - shouldResetActivityDates: Bus.send(K.activityDates, v) + shouldResetActivityDates: Bus.send(K.activityDates, v);Bus.deliver(K.activityDate, v) pipes: activeIds: [recent, K.activeIds] activityDates: [recent, K.activityDates] diff --git a/src/App.swift b/src/App.swift index c35b3d9..4d8093e 100644 --- a/src/App.swift +++ b/src/App.swift @@ -68,6 +68,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { let meetupIS = MeetupId.Service(.init()) let micS = Mic.Service(.init()) + var subscriptions = [AnyCancellable]() var window: UIWindow? func application( @@ -83,6 +84,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate window?.makeKeyAndVisible() /**/print("ИГР App.didFLWO") + printBus() //testMic1() //testMic2() //testMic2_id("1") @@ -94,6 +96,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate testMic4() return true } + + + func printBus() { + Bus.events + .sink { v in print("ИГР App.printB k/v: '\(v.0)'/'\(v.1)'") } + .store(in: &subscriptions) + } func testMic1() { DispatchQueue.main.asyncAfter(deadline: .now() + 1) { @@ -117,7 +126,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate } } - var subscriptions = [AnyCancellable]() func testMic2_id(_ id: String) { DispatchQueue.main.asyncAfter(deadline: .now() + 2) { Bus.send(Bus.keyId(Mic.K.activityDate, id), Date() + 2)