Skip to content

Commit

Permalink
Merge pull request #10 from SwiftRex/exposeActionFilter
Browse files Browse the repository at this point in the history
Expose action filter
  • Loading branch information
melle authored Jul 8, 2021
2 parents 61b76da + 849962d commit d4361fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let package = Package(
.library(name: "LoggerMiddleware", targets: ["LoggerMiddleware"])
],
dependencies: [
.package(url: "https://github.com/SwiftRex/SwiftRex.git", .upToNextMajor(from: "0.8.2"))
.package(url: "https://github.com/SwiftRex/SwiftRex.git", .upToNextMajor(from: "0.8.6"))
],
targets: [
.target(
Expand Down
2 changes: 2 additions & 0 deletions Sources/LoggerMiddleware/LoggerMiddleware.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ extension LoggerMiddleware {
public static func `default`(
actionTransform: LoggerMiddleware<IdentityMiddleware<InputActionType, OutputActionType, StateType>>.ActionTransform = .default(),
actionPrinter: LoggerMiddleware<IdentityMiddleware<InputActionType, OutputActionType, StateType>>.ActionLogger = .osLog,
actionFilter: @escaping (InputActionType) -> Bool = { _ in true },
stateDiffTransform: LoggerMiddleware<IdentityMiddleware<InputActionType, OutputActionType, StateType>>.StateDiffTransform = .diff(),
stateDiffPrinter: LoggerMiddleware<IdentityMiddleware<InputActionType, OutputActionType, StateType>>.StateLogger = .osLog,
queue: DispatchQueue = .main
Expand All @@ -92,6 +93,7 @@ extension LoggerMiddleware {
IdentityMiddleware(),
actionTransform: actionTransform,
actionPrinter: actionPrinter,
actionFilter: actionFilter,
stateDiffTransform: stateDiffTransform,
stateDiffPrinter: stateDiffPrinter,
queue: queue
Expand Down

0 comments on commit d4361fa

Please sign in to comment.