) -> Result<HttpResponse, LemmyError> {
let site_view = blocking(context.pool(), move |conn| SiteView::read(&conn)).await??;
- let listing_type_ = listing_type.clone();
let posts = blocking(context.pool(), move |conn| {
PostQueryBuilder::create(&conn)
- .listing_type(&listing_type_)
- .sort(&sort_type)
+ .listing_type(listing_type)
+ .sort(sort_type)
.list()
})
.await??;
let person = Person::find_by_name(&conn, &user_name)?;
let posts = PostQueryBuilder::create(&conn)
- .listing_type(&ListingType::All)
- .sort(sort_type)
+ .listing_type(ListingType::All)
+ .sort(*sort_type)
.creator_id(person.id)
.list()?;
let community = Community::read_from_name(&conn, &community_name)?;
let posts = PostQueryBuilder::create(&conn)
- .listing_type(&ListingType::All)
- .sort(sort_type)
+ .listing_type(ListingType::All)
+ .sort(*sort_type)
.community_id(community.id)
.list()?;
let show_read_posts = local_user.show_read_posts;
let posts = PostQueryBuilder::create(&conn)
- .listing_type(&ListingType::Subscribed)
+ .listing_type(ListingType::Subscribed)
.my_person_id(person_id)
.show_bot_accounts(show_bot_accounts)
.show_read_posts(show_read_posts)
- .sort(sort_type)
+ .sort(*sort_type)
.list()?;
let items = create_post_items(posts)?;
.recipient_id(person_id)
.my_person_id(person_id)
.show_bot_accounts(show_bot_accounts)
- .sort(&sort)
+ .sort(sort)
.list()?;
let mentions = PersonMentionQueryBuilder::create(&conn)
.recipient_id(person_id)
.my_person_id(person_id)
- .sort(&sort)
+ .sort(sort)
.list()?;
let items = create_reply_and_mention_items(replies, mentions)?;