Skip to content

Fix #4663: 排序模组时应忽略大小写#4665

Merged
Glavo merged 4 commits intoHMCL-dev:mainfrom
Glavo:mod-sort
Oct 13, 2025
Merged

Fix #4663: 排序模组时应忽略大小写#4665
Glavo merged 4 commits intoHMCL-dev:mainfrom
Glavo:mod-sort

Conversation

@Glavo
Copy link
Copy Markdown
Member

@Glavo Glavo commented Oct 13, 2025

No description provided.

Copilot AI review requested due to automatic review settings October 13, 2025 07:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes case-sensitive mod sorting by implementing case-insensitive comparison. The change addresses issue #4663 where mod modules should be sorted ignoring case sensitivity.

Key changes:

  • Updated LocalModFile comparison to use case-insensitive sorting
  • Simplified ModInfoObject by removing redundant comparison logic
  • Streamlined mod loading process by moving object creation earlier in the pipeline

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
LocalModFile.java Changed compareTo method to use compareToIgnoreCase for case-insensitive sorting
ModListPageSkin.java Removed redundant Comparable implementation and compareTo method from ModInfoObject
ModListPage.java Moved ModInfoObject creation to earlier stage in loadMods method

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

}

static final class ModInfoObject extends RecursiveTreeObject<ModInfoObject> implements Comparable<ModInfoObject> {
static final class ModInfoObject {
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

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

The ModInfoObject class should extend RecursiveTreeObject if it's used in a tree structure. Removing this inheritance may break tree functionality unless you've verified that tree operations are no longer needed.

Suggested change
static final class ModInfoObject {
static final class ModInfoObject extends RecursiveTreeObject<ModInfoObject> {

Copilot uses AI. Check for mistakes.
@Glavo Glavo merged commit 58d3780 into HMCL-dev:main Oct 13, 2025
2 checks passed
@Glavo Glavo deleted the mod-sort branch October 13, 2025 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants