|
|
@@ -15,7 +15,7 @@ extension MicItem { |
|
|
|
|
|
|
|
extension MicItem { |
|
|
|
final class Controller: MPAK.Controller<MicItem.Model> { |
|
|
|
init() { |
|
|
|
init(_ id: String? = nil) { |
|
|
|
/**/print("MicIC.init") |
|
|
|
super.init( |
|
|
|
MicItem.Model(), |
|
|
@@ -26,13 +26,13 @@ extension MicItem { |
|
|
|
|
|
|
|
// Нижеследующее предстоит сгенерить. |
|
|
|
m |
|
|
|
.sink { v in Bus.send(K.MI, v) } |
|
|
|
.sink { v in Bus.send(Bus.keyId(K.MI, id), v) } |
|
|
|
.store(in: &subscriptions) |
|
|
|
|
|
|
|
pipeValue( |
|
|
|
dbg: "activityD", |
|
|
|
sub: nil, |
|
|
|
Bus.events.compactMap { Bus.convertKeyValue(K.activityDate, $0) }.map { (k: String, v: Date?) in v }.eraseToAnyPublisher(), |
|
|
|
Bus.events.compactMap { Bus.convertKeyValue(Bus.keyId(K.activityDate, id), $0) }.map { (k: String, v: Date?) in v }.eraseToAnyPublisher(), |
|
|
|
{ |
|
|
|
$0.activityDate.value = $1 |
|
|
|
$0.activityDate.isRecent = true |
|
|
@@ -43,7 +43,7 @@ extension MicItem { |
|
|
|
pipe( |
|
|
|
dbg: "timeout", |
|
|
|
sub: nil, |
|
|
|
Bus.events.compactMap { Bus.convertKeyValue(K.timeout, $0) }.map { (k: String, v: Bool) in v }.eraseToAnyPublisher(), |
|
|
|
Bus.events.compactMap { Bus.convertKeyValue(Bus.keyId(K.timeout, id), $0) }.map { (k: String, v: Bool) in v }.eraseToAnyPublisher(), |
|
|
|
{ $0.timeout = true }, |
|
|
|
{ $0.timeout = false } |
|
|
|
) |
|
|
|