Skip to content

Commit

Permalink
Allow fetching post in empty range which means returning unlimited re…
Browse files Browse the repository at this point in the history
…sult
  • Loading branch information
crazytonyli committed Oct 18, 2023
1 parent 4f8178a commit c9c3473
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WordPress/Classes/Services/PostRepository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ extension PostRepository {
searchInput: input,
statuses: statuses,
authorUserID: authorUserID,
range: 0...max(limit - 1, 0),
range: 0..<max(limit, 0),
orderBy: orderBy,
descending: descending,
deleteOtherLocalPosts: false,
Expand All @@ -368,7 +368,7 @@ extension PostRepository {
searchInput: String? = nil,
statuses: [BasePost.Status]?,
authorUserID: NSNumber?,
range: ClosedRange<Int>,
range: Range<Int>,
orderBy: PostServiceResultsOrdering = .byDate,
descending: Bool = true,
deleteOtherLocalPosts: Bool,
Expand Down

0 comments on commit c9c3473

Please sign in to comment.