Compare commits
1 Commits
f4bb4e50e3
...
single
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32bfd5227e |
@@ -1,8 +0,0 @@
|
||||
extension MPAK {
|
||||
public struct Many<T> {
|
||||
public var keys = Set<String>()
|
||||
public var dict = [String: T]()
|
||||
|
||||
public init() { }
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
extension MPAK {
|
||||
public struct Recent<T> {
|
||||
public var isRecent = false
|
||||
public var value: T
|
||||
|
||||
public init(_ value: T) {
|
||||
self.value = value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1 +1,10 @@
|
||||
public enum MPAK { }
|
||||
public enum MPAK {
|
||||
public struct Recent<T> {
|
||||
public var isRecent = false
|
||||
public var value: T
|
||||
|
||||
public init(_ value: T) {
|
||||
self.value = value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,14 +47,12 @@ 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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
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,8 +7,15 @@ 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,7 +36,6 @@ extension %MODULE% {
|
||||
let ctrl = Controller()
|
||||
let world: World
|
||||
%SERVICE_CORE%
|
||||
var any = [Any]()
|
||||
var subscriptions = [AnyCancellable]()
|
||||
static private(set) weak var singleton: Service?
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ struct Content: View {
|
||||
var body: some View {
|
||||
MeetupId.V()
|
||||
Divider()
|
||||
MeetupId.V()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user