Compare commits
10 Commits
many
...
f4bb4e50e3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4bb4e50e3 | ||
|
|
a018cbee59 | ||
|
|
676ec75bef | ||
|
|
f11dde1c8e | ||
|
|
676a1ada17 | ||
|
|
f3807b76f6 | ||
|
|
56512ca26a | ||
|
|
a5de0484fd | ||
|
|
f838021562 | ||
|
|
752b34b95d |
8
Modules/MPAKX/src/MPAK.Many.swift
Normal file
8
Modules/MPAKX/src/MPAK.Many.swift
Normal file
@@ -0,0 +1,8 @@
|
||||
extension MPAK {
|
||||
public struct Many<T> {
|
||||
public var keys = Set<String>()
|
||||
public var dict = [String: T]()
|
||||
|
||||
public init() { }
|
||||
}
|
||||
}
|
||||
10
Modules/MPAKX/src/MPAK.Recent.swift
Normal file
10
Modules/MPAKX/src/MPAK.Recent.swift
Normal file
@@ -0,0 +1,10 @@
|
||||
extension MPAK {
|
||||
public struct Recent<T> {
|
||||
public var isRecent = false
|
||||
public var value: T
|
||||
|
||||
public init(_ value: T) {
|
||||
self.value = value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1 @@
|
||||
public enum MPAK {
|
||||
public struct Recent<T> {
|
||||
public var isRecent = false
|
||||
public var value: T
|
||||
|
||||
public init(_ value: T) {
|
||||
self.value = value
|
||||
}
|
||||
}
|
||||
}
|
||||
public enum MPAK { }
|
||||
|
||||
@@ -47,12 +47,14 @@ extension MeetupId {
|
||||
let ctrl = Controller()
|
||||
let world: World
|
||||
|
||||
var any = [Any]()
|
||||
var subscriptions = [AnyCancellable]()
|
||||
static private(set) weak var singleton: Service?
|
||||
|
||||
public init(_ world: World) {
|
||||
self.world = world
|
||||
Self.singleton = self
|
||||
SectionBus.setupService(ctrl, self, world)
|
||||
SectionGenerated.setupPlatform(ctrl, self, world)
|
||||
}
|
||||
}
|
||||
|
||||
18
Modules/MeetupIdX/src/MeetupId.SectionBus.swift
Normal file
18
Modules/MeetupIdX/src/MeetupId.SectionBus.swift
Normal file
@@ -0,0 +1,18 @@
|
||||
import BusX
|
||||
|
||||
extension MeetupId {
|
||||
enum SectionBus {
|
||||
static func setupService(
|
||||
_ ctrl: Controller,
|
||||
_ service: Service,
|
||||
_ world: World
|
||||
) {
|
||||
service.any.append(contentsOf: [
|
||||
Bus.Debounce(shouldResetText, 0.2, K.M, K.textApp),
|
||||
Bus.Delay(shouldFinishLoading, 5, K.M, K.finishLoading),
|
||||
Bus.Sync(shouldEnableJoin, K.M, K.isJoinAvailable),
|
||||
Bus.Sync(shouldResetLoading, K.M, K.isLoading)
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,15 +7,8 @@ extension MeetupId {
|
||||
@StateObject var isLoading = BusUI.Value(K.isLoading, false)
|
||||
@StateObject var join = BusUI.Button(K.join)
|
||||
@StateObject var textField = BusUI.TextField(K.textApp, K.textUI)
|
||||
let processors: [Any]
|
||||
|
||||
public init() {
|
||||
processors = [
|
||||
Bus.Debounce(shouldResetText, 0.2, K.M, K.textApp),
|
||||
Bus.Delay(shouldFinishLoading, 5, K.M, K.finishLoading),
|
||||
Bus.Sync(shouldEnableJoin, K.M, K.isJoinAvailable),
|
||||
Bus.Sync(shouldResetLoading, K.M, K.isLoading)
|
||||
]
|
||||
}
|
||||
|
||||
public var body: some View {
|
||||
|
||||
@@ -36,6 +36,7 @@ extension %MODULE% {
|
||||
let ctrl = Controller()
|
||||
let world: World
|
||||
%SERVICE_CORE%
|
||||
var any = [Any]()
|
||||
var subscriptions = [AnyCancellable]()
|
||||
static private(set) weak var singleton: Service?
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ struct Content: View {
|
||||
var body: some View {
|
||||
MeetupId.V()
|
||||
Divider()
|
||||
MeetupId.V()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user