Skip to content

Commit

Permalink
fix: Pager delay not working
Browse files Browse the repository at this point in the history
Closes #52
  • Loading branch information
sbertix committed Jan 21, 2023
1 parent d4f0198 commit 24a013c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/ComposableRequest/Publishers/Pager/Pager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@ public extension Publishers {
case let delay:
return current
.append(
Deferred { Pager(count - 1, offset: next, delay: self.delay, generator: generator) }
Just(())
.setFailureType(to: Failure.self)
.delay(for: delay, scheduler: RunLoop.main)
.flatMap { _ in Pager(count - 1, offset: next, delay: delay, generator: generator) }
)
.eraseToAnyPublisher()
}
Expand Down

0 comments on commit 24a013c

Please sign in to comment.