From deb238bb214a32f7b14ee0392276a3913a359ea8 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: Tue, 16 Jan 2024 18:55:00 +0300 Subject: [PATCH] d --- Modules/MicX/MicItem/src/MicItem.V.swift | 7 ---- src/App.swift | 42 +++++++++++++++--------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/Modules/MicX/MicItem/src/MicItem.V.swift b/Modules/MicX/MicItem/src/MicItem.V.swift index 5e80ffa..c10f215 100644 --- a/Modules/MicX/MicItem/src/MicItem.V.swift +++ b/Modules/MicX/MicItem/src/MicItem.V.swift @@ -8,13 +8,6 @@ extension MicItem { public init(_ id: String? = nil) { self.id = id - - DispatchQueue.main.asyncAfter(deadline: .now() + 2) { - Bus.send(Mic.K.isActive, true) - } - DispatchQueue.main.asyncAfter(deadline: .now() + 5) { - Bus.send(Mic.K.isActive, false) - } } public var body: some View { diff --git a/src/App.swift b/src/App.swift index aabc679..ae50b1d 100644 --- a/src/App.swift +++ b/src/App.swift @@ -1,3 +1,4 @@ +import BusX import MeetupIdX import MicX import SwiftUI @@ -14,23 +15,32 @@ struct Content: View { @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { - let meetupIS = MeetupId.Service(.init()) - var window: UIWindow? + let meetupIS = MeetupId.Service(.init()) + var window: UIWindow? - func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - window = UIWindow(frame: UIScreen.main.bounds) - let vc = UIViewController() - addSwiftUIViewAsChild(swiftUIView: Content(), parent: vc.view) - vc.view.backgroundColor = .white - window?.rootViewController = vc - window?.backgroundColor = UIColor.white - window?.makeKeyAndVisible() + func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + window = UIWindow(frame: UIScreen.main.bounds) + let vc = UIViewController() + addSwiftUIViewAsChild(swiftUIView: Content(), parent: vc.view) + vc.view.backgroundColor = .white + window?.rootViewController = vc + window?.backgroundColor = UIColor.white + window?.makeKeyAndVisible() - /**/print("ИГР UUID:", UUID().uuidString) - - return true + /**/print("ИГР App.didFLWO") + testMic1() + return true + } + + func testMic1() { + DispatchQueue.main.asyncAfter(deadline: .now() + 2) { + Bus.send(Mic.K.isActive, true) + } + DispatchQueue.main.asyncAfter(deadline: .now() + 5) { + Bus.send(Mic.K.isActive, false) } + } }