Skip to content

Commit

Permalink
Cursor pagination hotfix (#817)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricBAndrews authored Dec 18, 2023
1 parent 0ad988d commit f716294
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Mlem.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3439,7 +3439,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.1;
MARKETING_VERSION = 1.1.2;
PRODUCT_BUNDLE_IDENTIFIER = com.hanners.Mlem;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down Expand Up @@ -3480,7 +3480,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.1;
MARKETING_VERSION = 1.1.2;
PRODUCT_BUNDLE_IDENTIFIER = com.hanners.Mlem;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down
2 changes: 1 addition & 1 deletion Mlem/API/Requests/Post/GetPosts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct GetPostsRequest: APIGetRequest {

let paginationParameter: URLQueryItem
if let cursor {
paginationParameter = .init(name: "page_v2", value: cursor)
paginationParameter = .init(name: "page_cursor", value: cursor)
} else {
paginationParameter = .init(name: "page", value: "\(page)")
}
Expand Down
2 changes: 1 addition & 1 deletion Mlem/Models/Trackers/Post Tracker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class PostTracker: ObservableObject {
let thresholdIndex = max(0, items.index(items.endIndex, offsetBy: AppConstants.infiniteLoadThresholdOffset))
if thresholdIndex >= 0,
let itemIndex = items.firstIndex(where: { $0.uid == item.uid }),
itemIndex >= thresholdIndex {
itemIndex == thresholdIndex {
return true
}

Expand Down

0 comments on commit f716294

Please sign in to comment.