mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-17 09:25:50 +00:00
Fixing a bug with stickied order.
This commit is contained in:
parent
875b0e6f01
commit
0b4ecdfc05
@ -272,11 +272,15 @@ impl<'a> PostQueryBuilder<'a> {
|
||||
};
|
||||
|
||||
if let Some(for_community_id) = self.for_community_id {
|
||||
query = query.filter(community_id.eq(for_community_id));
|
||||
query = query
|
||||
.filter(community_id.eq(for_community_id))
|
||||
.then_order_by(stickied.desc());
|
||||
}
|
||||
|
||||
if let Some(for_community_name) = self.for_community_name {
|
||||
query = query.filter(community_name.eq(for_community_name));
|
||||
query = query
|
||||
.filter(community_name.eq(for_community_name))
|
||||
.then_order_by(stickied.desc());
|
||||
}
|
||||
|
||||
if let Some(url_search) = self.url_search {
|
||||
@ -290,8 +294,6 @@ impl<'a> PostQueryBuilder<'a> {
|
||||
.or_filter(body.ilike(searcher));
|
||||
}
|
||||
|
||||
query = query.then_order_by(stickied.desc());
|
||||
|
||||
query = match self.sort {
|
||||
SortType::Active => query
|
||||
.then_order_by(hot_rank_active.desc())
|
||||
|
Loading…
Reference in New Issue
Block a user