this post was submitted on 26 Mar 2024
5 points (100.0% liked)

Summit

718 readers
16 users here now

Community to discuss Summit, a Lemmy reader for Android.

App (Play Store): https://play.google.com/store/apps/details?id=com.idunnololz.summit

APK: https://github.com/idunnololz/summit-for-lemmy/releases

Patreon: https://patreon.com/SummitforLemmy

Ko-Fi: https://ko-fi.com/summitforlemmy

founded 1 year ago
MODERATORS
 

If I sort a multicommunity by 'Hot', it will show all posts from community 1, then all posts by community 2, etc... kind of defying the purpose of a multicommunity at all. I solved it by sorting by 'New' instead, but I figured I'd mention it here because it took me a while to notice - I thought people were not making new posts at all, while in fact, it was just displaying all posts by a lowly populated community first.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] idunnololz 3 points 6 months ago* (last edited 6 months ago) (1 children)

Thank you for reporting this issue. Looks like v0.19 of Lemmy broke this. Previously Lemmy returned sort scores which made it possible for clients to order posts based on weights defined by the server. v0.19 seems to no longer return these values so the client defaults to a score of 0 for everything. This bug likely affects sorting by scaled, controversy, active and hot. I'll see if I can calculates these scores client side. If not then unfortunately these sort orders will not be supported for multi-communities going forward.

Edit: Looks like client side calculations for sorting scores is do-able. The downside is, Lemmy's ranking system updates all the time. Managing these ranking scores on the client side means the way the client sorts stuff might not always be aligned with the server however it should be close enough that it shouldn't cause issues in most cases.

[โ€“] idunnololz 1 points 6 months ago* (last edited 6 months ago)

This is just notes for me.

Lemmy server's calculate hot rank score (used for Hot sort order) as:

hours_diff = (now - publish_time_ms) / 3600
if (hours_diff > 0 && hours_diff < 168) {
  hot_rank = log(max(2, score + 2)) / pow((hours_diff + 2), 1.8)
} else {
  hot_rank = 0
}

hot active score (used for Active sort order) as:

newest_comment_time_necro = min(newest_comment_time, two_days_ms)
hours_diff = (now - newest_comment_time_necro) / 3600
if (hours_diff > 0 && hours_diff < 168) {
  hot_active_rank = log(max(2, score + 2)) / pow((hours_diff + 2), 1.8)
} else {
  hot_active_rank = 0
}

scaled score (used for Scaled sort order) as:

hot_rank / log(2 + MAU)

controversy rank (used for Controversal sort order) as:

if (downvotes == 0 || upvotes == ) {
  rank = 0
} else {
  rank = (upvotes + downvotes) * min(upvotes, downvotes) / max(upvotes, downvotes)
}