Михаил Капелько 10 months ago
parent
commit
f9612a878d
4 changed files with 4 additions and 12 deletions
  1. +1
    -1
      Modules/MeetupIdX/src/MeetupId.Generated.swift
  2. +2
    -3
      Utilities/platform/2/generation/pipeBusSource.py
  3. +1
    -2
      Utilities/platform/2/generation/sectionGeneratedPipes.py
  4. +0
    -6
      Utilities/platform/2/templates/section-generated-pipe-src-bus-toggle

+ 1
- 1
Modules/MeetupIdX/src/MeetupId.Generated.swift View File

@@ -93,7 +93,7 @@ extension MeetupId {
ctrl.pipe(
dbg: "join",
sub: nil,
Bus.events.compactMap { Bus.convertKeyValue(K.join, $0) }.map { (k: String, v: Bool) in v }.map { _ in () }.eraseToAnyPublisher(),
Bus.events.compactMap { Bus.convertKeyValue(K.join, $0) }.map { (k: String, v: Void) in v }.eraseToAnyPublisher(),
{ $0.join = true },
{ $0.join = false }
)


+ 2
- 3
Utilities/platform/2/generation/pipeBusSource.py View File

@@ -1,8 +1,7 @@
def pipeBusSource(name, entity, busKey, structure, fmtBusPipe, fmtBusPipeToggle):
def pipeBusSource(name, entity, busKey, structure, fmt):
valueType = structure.model.fields[name][0]
fmt = fmtBusPipe
if "toggle" in entity.pipes[name]:
fmt = fmtBusPipeToggle
valueType = "Void"

return fmt \
.replace("%BUS_KEY%", busKey) \


+ 1
- 2
Utilities/platform/2/generation/sectionGeneratedPipes.py View File

@@ -5,7 +5,6 @@ from generation.pipeSource import *

def sectionGeneratedPipes(entity, sub, c):
fmtBusPipe = c.readFile(f"{c.dir}/templates/section-generated-pipe-src-bus")[0]
fmtBusPipeToggle = c.readFile(f"{c.dir}/templates/section-generated-pipe-src-bus-toggle")[0]
fmtExRecent = c.readFile(f"{c.dir}/templates/section-generated-pipe-ex-recent")
fmtRecent = c.readFile(f"{c.dir}/templates/section-generated-pipe-recent")
fmtSet = c.readFile(f"{c.dir}/templates/section-generated-pipe-set")
@@ -32,7 +31,7 @@ def sectionGeneratedPipes(entity, sub, c):
src = pipeSource(key, entity)
# Bus.
if src.startswith("K."):
src = pipeBusSource(key, entity, src, c.structure, fmtBusPipe, fmtBusPipeToggle)
src = pipeBusSource(key, entity, src, c.structure, fmtBusPipe)

fmtPipe = pipeFormat(fmtExRecent, fmtRecent, fmtSet, fmtToggle, fmtToggleNil, key, entity)
for fmt in fmtPipe:


+ 0
- 6
Utilities/platform/2/templates/section-generated-pipe-src-bus-toggle View File

@@ -1,6 +0,0 @@
Bus.events.compactMap { Bus.convertKeyValue(%BUS_KEY%, $0) }.map { (k: String, v: %BUS_VALUE_TYPE%) in v }.map { _ in () }

Loading…
Cancel
Save