Михаил Капелько 10 months ago
parent
commit
ee57d253bc
4 changed files with 11 additions and 4 deletions
  1. +1
    -1
      Modules/MicX/Mic/src/Mic.K.swift
  2. +2
    -3
      Modules/MicX/MicItem/src/MicItem.V.swift
  3. +6
    -0
      Modules/MicX/MicItem/src/MicItem.WillBe.swift
  4. +2
    -0
      Modules/MicX/MicItem/src/MicItem.swift

+ 1
- 1
Modules/MicX/Mic/src/Mic.K.swift View File

@@ -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"
} }
} }

+ 2
- 3
Modules/MicX/MicItem/src/MicItem.V.swift View File

@@ -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),
] ]
} }


+ 6
- 0
Modules/MicX/MicItem/src/MicItem.WillBe.swift View File

@@ -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)
} }
} }
} }

+ 2
- 0
Modules/MicX/MicItem/src/MicItem.swift View File

@@ -1 +1,3 @@
public enum MicItem { } public enum MicItem { }

typealias K = Mic.K

Loading…
Cancel
Save