|
@@ -4,13 +4,13 @@ import SwiftUI |
|
|
extension MicItem { |
|
|
extension MicItem { |
|
|
public struct V: View { |
|
|
public struct V: View { |
|
|
var id: String? |
|
|
var id: String? |
|
|
|
|
|
@StateObject var h = BusUI.Holder() |
|
|
@StateObject var isActive = BusUI.Value(K.isActive, false) |
|
|
@StateObject var isActive = BusUI.Value(K.isActive, false) |
|
|
let proc: [Any] |
|
|
|
|
|
|
|
|
|
|
|
public init(_ id: String? = nil) { |
|
|
public init(_ id: String? = nil) { |
|
|
self.id = id |
|
|
self.id = id |
|
|
/**/print("ИГР MicIV.init id: '\(id)'") |
|
|
/**/print("ИГР MicIV.init id: '\(id)'") |
|
|
self.proc = [ |
|
|
|
|
|
|
|
|
h.items = [ |
|
|
Bus.Delay(shouldResetTimeout, K.MI, K.timeout, id), |
|
|
Bus.Delay(shouldResetTimeout, K.MI, K.timeout, id), |
|
|
Bus.Sync(shouldResetActivity, K.MI, K.isActive, id), |
|
|
Bus.Sync(shouldResetActivity, K.MI, K.isActive, id), |
|
|
MicItem.Controller(id) |
|
|
MicItem.Controller(id) |
|
@@ -27,7 +27,7 @@ extension MicItem { |
|
|
.animation(.easeInOut(duration: 0.3)) |
|
|
.animation(.easeInOut(duration: 0.3)) |
|
|
.onAppear { |
|
|
.onAppear { |
|
|
isActive.id = id |
|
|
isActive.id = id |
|
|
Bus.send(K.requestActivityDate, id) |
|
|
|
|
|
|
|
|
//Bus.send(K.requestActivityDate, id) |
|
|
} |
|
|
} |
|
|
.onChange(of: id) { newValue in |
|
|
.onChange(of: id) { newValue in |
|
|
isActive.id = newValue |
|
|
isActive.id = newValue |
|
|