From ee57d253bc6d45c3b03156482d46f7a319c0079b 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: Wed, 17 Jan 2024 18:01:41 +0300 Subject: [PATCH] d --- Modules/MicX/Mic/src/Mic.K.swift | 2 +- Modules/MicX/MicItem/src/MicItem.V.swift | 5 ++--- Modules/MicX/MicItem/src/MicItem.WillBe.swift | 6 ++++++ Modules/MicX/MicItem/src/MicItem.swift | 2 ++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Modules/MicX/Mic/src/Mic.K.swift b/Modules/MicX/Mic/src/Mic.K.swift index 28bd311..e3f8441 100644 --- a/Modules/MicX/Mic/src/Mic.K.swift +++ b/Modules/MicX/Mic/src/Mic.K.swift @@ -2,6 +2,6 @@ public extension Mic { enum K { public static let activityDate = "Mic.activityDate" public static let isActive = "Mic.isActive" - public static let itemM = "Mic.Item.Model" + public static let MI = "Mic.Model.Item" } } diff --git a/Modules/MicX/MicItem/src/MicItem.V.swift b/Modules/MicX/MicItem/src/MicItem.V.swift index b9cc4ba..42c7d77 100644 --- a/Modules/MicX/MicItem/src/MicItem.V.swift +++ b/Modules/MicX/MicItem/src/MicItem.V.swift @@ -4,15 +4,14 @@ import SwiftUI extension MicItem { public struct V: View { var id: String? - @StateObject var isActive = BusUI.Value(Mic.K.isActive, false) + @StateObject var isActive = BusUI.Value(K.isActive, false) let ctrl = MicItem.Controller() let processors: [Any] public init(_ id: String? = nil) { self.id = id self.processors = [ - //Bus.Pipe(), - //Bus.Sync(shouldResetActivity, Mic.K.MI, Mic.K.isActive), + //Bus.Sync(shouldResetActivity, K.MI, K.isActive), ] } diff --git a/Modules/MicX/MicItem/src/MicItem.WillBe.swift b/Modules/MicX/MicItem/src/MicItem.WillBe.swift index 0cf85b5..6987451 100644 --- a/Modules/MicX/MicItem/src/MicItem.WillBe.swift +++ b/Modules/MicX/MicItem/src/MicItem.WillBe.swift @@ -16,6 +16,12 @@ extension MicItem { debugClassName: "MicICtrl", debugLog: { print($0) } ) + + + // Нижеследующее предстоит сгенерить. + m + .sink { v in Bus.send(K.MI, v) } + .store(in: &service.subscriptions) } } } diff --git a/Modules/MicX/MicItem/src/MicItem.swift b/Modules/MicX/MicItem/src/MicItem.swift index c7740eb..8dbe2b7 100644 --- a/Modules/MicX/MicItem/src/MicItem.swift +++ b/Modules/MicX/MicItem/src/MicItem.swift @@ -1 +1,3 @@ public enum MicItem { } + +typealias K = Mic.K