@@ -2,6 +2,6 @@ public extension Mic { | |||||
enum K { | enum K { | ||||
public static let activityDate = "Mic.activityDate" | public static let activityDate = "Mic.activityDate" | ||||
public static let isActive = "Mic.isActive" | public static let isActive = "Mic.isActive" | ||||
public static let itemM = "Mic.Item.Model" | |||||
public static let MI = "Mic.Model.Item" | |||||
} | } | ||||
} | } |
@@ -4,15 +4,14 @@ import SwiftUI | |||||
extension MicItem { | extension MicItem { | ||||
public struct V: View { | public struct V: View { | ||||
var id: String? | 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 ctrl = MicItem.Controller() | ||||
let processors: [Any] | let processors: [Any] | ||||
public init(_ id: String? = nil) { | public init(_ id: String? = nil) { | ||||
self.id = id | self.id = id | ||||
self.processors = [ | self.processors = [ | ||||
//Bus.Pipe(), | |||||
//Bus.Sync(shouldResetActivity, Mic.K.MI, Mic.K.isActive), | |||||
//Bus.Sync(shouldResetActivity, K.MI, K.isActive), | |||||
] | ] | ||||
} | } | ||||
@@ -16,6 +16,12 @@ extension MicItem { | |||||
debugClassName: "MicICtrl", | debugClassName: "MicICtrl", | ||||
debugLog: { print($0) } | debugLog: { print($0) } | ||||
) | ) | ||||
// Нижеследующее предстоит сгенерить. | |||||
m | |||||
.sink { v in Bus.send(K.MI, v) } | |||||
.store(in: &service.subscriptions) | |||||
} | } | ||||
} | } | ||||
} | } |
@@ -1 +1,3 @@ | |||||
public enum MicItem { } | public enum MicItem { } | ||||
typealias K = Mic.K |