mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 11:21:32 +00:00
Fix legacy pagination for Subscribed feed (#4030)
This is the fix suggested in #4019 I've manually tested both legacy pagination (`page=2&limit=20`) as well as the new pagination (`cursor_next=XXXXXXX&limit=20`) using the same endpoint as #4019, and both methods appear to work as expected.
This commit is contained in:
parent
291ff19718
commit
3a1be8c041
1 changed files with 1 additions and 1 deletions
|
@ -629,7 +629,7 @@ impl<'a> PostQuery<'a> {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
let (limit, offset) = limit_and_offset(self.page, self.limit)?;
|
let (limit, offset) = limit_and_offset(self.page, self.limit)?;
|
||||||
if offset != 0 {
|
if offset != 0 && self.page_after.is_some() {
|
||||||
return Err(Error::QueryBuilderError(
|
return Err(Error::QueryBuilderError(
|
||||||
"legacy pagination cannot be combined with v2 pagination".into(),
|
"legacy pagination cannot be combined with v2 pagination".into(),
|
||||||
));
|
));
|
||||||
|
|
Loading…
Reference in a new issue