This commit is contained in:
Михаил Капелько
2024-01-26 18:41:05 +03:00
parent 472af2e766
commit b9ca315dad
5 changed files with 47 additions and 18 deletions

View File

@@ -111,25 +111,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate
}
func testMic4() {
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
Bus.send(
Mic.K.activityDates,
[
"1": Date().addingTimeInterval(3),
"2": Date().addingTimeInterval(5),
]
)
}
delayedSend(2, Mic.K.activeIds, ["1"])
delayedSend(4, Mic.K.activeIds, ["1", "4"])
}
DispatchQueue.main.asyncAfter(deadline: .now() + 4) {
Bus.send(
Mic.K.activityDates,
[
"1": Date().addingTimeInterval(2),
"4": Date().addingTimeInterval(5),
]
)
func delayedSend(
_ delay: TimeInterval,
_ key: String,
_ value: Any
) {
DispatchQueue.main.asyncAfter(deadline: .now() + delay) {
Bus.send(key, value)
}
}
}