提交
This commit is contained in:
20
TUIKit/TUIRoomKit/Source/Store/Error/ErrorEffects.swift
Normal file
20
TUIKit/TUIRoomKit/Source/Store/Error/ErrorEffects.swift
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// ErrorEffects.swift
|
||||
// TUIRoomKit
|
||||
//
|
||||
// Created by CY zhao on 2024/7/8.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
class ErrorEffects: Effects {
|
||||
typealias Environment = ServiceCenter
|
||||
|
||||
let throwError = Effect<Environment>.nonDispatching { actions, environment in
|
||||
actions
|
||||
.wasCreated(from: ErrorActions.throwError)
|
||||
.sink { action in
|
||||
environment.store?.errorSubject.send(action.payload)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user