d
This commit is contained in:
@@ -2,12 +2,3 @@ version: 5
|
|||||||
|
|
||||||
activityDates: [Date?, nil, recent]
|
activityDates: [Date?, nil, recent]
|
||||||
timeout: [Bool, false, toggle]
|
timeout: [Bool, false, toggle]
|
||||||
|
|
||||||
reallyTest1: [Bool, false, exRecent]
|
|
||||||
exReallyTest1: [Bool?, nil, set]
|
|
||||||
test2: [Bool, false, set]
|
|
||||||
test3: [Bool, false, toggleNil]
|
|
||||||
test4: [Bool, false, exrecent, K]
|
|
||||||
test5: [Bool, false, recent, D]
|
|
||||||
test6: [Bool, false, recent, K.abc]
|
|
||||||
test7: [Bool, false, recent, D.def]
|
|
||||||
|
|||||||
@@ -12,14 +12,6 @@ import UIKit
|
|||||||
|
|
||||||
public protocol MicItemContext {
|
public protocol MicItemContext {
|
||||||
var activityDates: MPAK.Recent<Date?> { get }
|
var activityDates: MPAK.Recent<Date?> { get }
|
||||||
var exReallyTest1: Bool? { get }
|
|
||||||
var reallyTest1: Bool { get }
|
|
||||||
var test2: Bool { get }
|
|
||||||
var test3: Bool { get }
|
|
||||||
var test4: Bool { get }
|
|
||||||
var test5: MPAK.Recent<Bool> { get }
|
|
||||||
var test6: MPAK.Recent<Bool> { get }
|
|
||||||
var test7: MPAK.Recent<Bool> { get }
|
|
||||||
var timeout: Bool { get }
|
var timeout: Bool { get }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,14 +21,6 @@ extension MicItem {
|
|||||||
|
|
||||||
public struct Model: MicItemContext {
|
public struct Model: MicItemContext {
|
||||||
public var activityDates: MPAK.Recent<Date?> = .init(nil)
|
public var activityDates: MPAK.Recent<Date?> = .init(nil)
|
||||||
public var exReallyTest1: Bool? = nil
|
|
||||||
public var reallyTest1: Bool = false
|
|
||||||
public var test2: Bool = false
|
|
||||||
public var test3: Bool = false
|
|
||||||
public var test4: Bool = false
|
|
||||||
public var test5: MPAK.Recent<Bool> = .init(false)
|
|
||||||
public var test6: MPAK.Recent<Bool> = .init(false)
|
|
||||||
public var test7: MPAK.Recent<Bool> = .init(false)
|
|
||||||
public var timeout: Bool = false
|
public var timeout: Bool = false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,56 +52,6 @@ extension MicItem {
|
|||||||
},
|
},
|
||||||
{ m, _ in m.activityDates.isRecent = false }
|
{ m, _ in m.activityDates.isRecent = false }
|
||||||
)
|
)
|
||||||
pipeValue(
|
|
||||||
dbg: "reallyT",
|
|
||||||
Bus.events.compactMap { Bus.convertKeyValue(Bus.keyId(K.reallyTest1, id), $0) }.map { (k: String, v: Bool) in v }.eraseToAnyPublisher(),
|
|
||||||
{
|
|
||||||
$0.reallyTest1.value = $1
|
|
||||||
$0.reallyTest1.isRecent = true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
$0.reallyTest1.isRecent = false
|
|
||||||
$0.exReallyTest1 = $1
|
|
||||||
}
|
|
||||||
)
|
|
||||||
pipeValue(
|
|
||||||
dbg: "test2",
|
|
||||||
Bus.events.compactMap { Bus.convertKeyValue(Bus.keyId(K.test2, id), $0) }.map { (k: String, v: Bool) in v }.eraseToAnyPublisher(),
|
|
||||||
{ $0.test2 = $1 }
|
|
||||||
)
|
|
||||||
pipeValue(
|
|
||||||
dbg: "test3",
|
|
||||||
Bus.events.compactMap { Bus.convertKeyValue(Bus.keyId(K.test3, id), $0) }.map { (k: String, v: Bool) in v }.eraseToAnyPublisher(),
|
|
||||||
{ $0.test3 = $1 },
|
|
||||||
{ m, _ in m.test3 = nil }
|
|
||||||
)
|
|
||||||
pipeValue(
|
|
||||||
dbg: "test5",
|
|
||||||
Bus.events.compactMap { Bus.convertKeyValue(Bus.keyId(D.test5, id), $0) }.map { (k: String, v: Bool) in v }.eraseToAnyPublisher(),
|
|
||||||
{
|
|
||||||
$0.test5.value = $1
|
|
||||||
$0.test5.isRecent = true
|
|
||||||
},
|
|
||||||
{ m, _ in m.test5.isRecent = false }
|
|
||||||
)
|
|
||||||
pipeValue(
|
|
||||||
dbg: "test6",
|
|
||||||
Bus.events.compactMap { Bus.convertKeyValue(Bus.keyId(K.abc, id), $0) }.map { (k: String, v: Bool) in v }.eraseToAnyPublisher(),
|
|
||||||
{
|
|
||||||
$0.test6.value = $1
|
|
||||||
$0.test6.isRecent = true
|
|
||||||
},
|
|
||||||
{ m, _ in m.test6.isRecent = false }
|
|
||||||
)
|
|
||||||
pipeValue(
|
|
||||||
dbg: "test7",
|
|
||||||
Bus.events.compactMap { Bus.convertKeyValue(Bus.keyId(D.def, id), $0) }.map { (k: String, v: Bool) in v }.eraseToAnyPublisher(),
|
|
||||||
{
|
|
||||||
$0.test7.value = $1
|
|
||||||
$0.test7.isRecent = true
|
|
||||||
},
|
|
||||||
{ m, _ in m.test7.isRecent = false }
|
|
||||||
)
|
|
||||||
pipe(
|
pipe(
|
||||||
dbg: "timeout",
|
dbg: "timeout",
|
||||||
Bus.events.compactMap { Bus.convertKeyValue(Bus.keyId(K.timeout, id), $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(),
|
||||||
|
|||||||
Reference in New Issue
Block a user