Михаил Капелько 10 months ago
parent
commit
1afcae37a7
3 changed files with 17 additions and 2 deletions
  1. +1
    -1
      Modules/MeetupIdX/src/MeetupId.Aux.swift
  2. +15
    -0
      Modules/MeetupIdX/src/MeetupId.Generated.swift
  3. +1
    -1
      Modules/MeetupIdX/src/MeetupId.V.swift

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

@@ -3,7 +3,7 @@ import Foundation
public extension MeetupId {
static func finishLoading(_ isLoading: Bool) -> Bool? {
guard isLoading else { return nil }
return false
return true
}

static func formatId(_ s: String) -> String? {


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

@@ -12,6 +12,7 @@ import UIKit
// MARK: - Context

public protocol MeetupIdContext {
var finishLoading: Bool { get }
var isLoading: MPAK.Recent<Bool> { get }
var join: Bool { get }
var textUI: MPAK.Recent<String> { get }
@@ -35,6 +36,7 @@ extension MeetupId {
// MARK: - Model

public struct Model: MeetupIdContext {
public var finishLoading: Bool = false
public var isLoading: MPAK.Recent<Bool> = .init(false)
public var join: Bool = false
public var textUI: MPAK.Recent<String> = .init("")
@@ -93,6 +95,19 @@ extension MeetupId {

// MARK: - SectionGenerated Service Pipes

ctrl.pipe(
dbg: "finishL",
sub: nil,
Bus.events.compactMap { Bus.convertKeyValue(K.finishLoading, $0) }.map { (k: String, v: Void) in v }.eraseToAnyPublisher(),
{ $0.finishLoading = true },
{ $0.finishLoading = false }
)






ctrl.pipeValue(
dbg: "isL",
sub: nil,


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

@@ -11,7 +11,7 @@ extension MeetupId {
let processors: [Any] = [
Bus.Processor(shouldEnableJoin, K.M, K.isJoinAvailable),
MeetupId.Debounce(0.2, formatId, K.textUI, K.textApp),
MeetupId.Delay(5, finishLoading, K.isLoading, K.isLoading),
MeetupId.Delay(5, finishLoading, K.isLoading, K.finishLoading),
]
public init() { }


Loading…
Cancel
Save