Skip to content

fix: show favorited mods first in search results - #1373

Open
vexthatguy wants to merge 1 commit into
Polyfrost:v1from
vexthatguy:fix/1366
Open

vexthatguy wants to merge 1 commit into
Polyfrost:v1from
vexthatguy:fix/1366

Conversation

@vexthatguy

Copy link
Copy Markdown

Fixes #1366. Search results previously kept the provider's raw ranking, so favorited mods could appear below non-favorited ones. Re-sort the matching mods with a stable sort that keeps favorites ahead while preserving rank order within each group.

Description

Search results previously kept the provider's raw ranking, so favorited
mods could appear below non-favorited ones. Matching mods are now
re-sorted with a stable sort that keeps favorited mods first while
preserving the provider's rank order within each group.

Related Issue(s)

Fixes #1366

@Tellinq Tellinq left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

searchedQuery = query
}

// Favorite mods first, keeping the provider's ranking within each group (stable sort)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment isn't necessary. I would remove this, and then this PR should be good.

@lunaynx
lunaynx force-pushed the v1 branch 4 times, most recently from 6fea82e to d7a54ab Compare November 20, 2026 18:18
Fixes Polyfrost#1366. Search results previously kept the provider's raw ranking,
so favorited mods could appear below non-favorited ones. Re-sort the
matching mods with a stable sort that keeps favorites ahead while
preserving rank order within each group.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Favorite mods should come up first before other mods in the search results

2 participants