Skip to content

Commit 367c03e

Browse files
committed
fix(mods): hide engine picker in Manage Mods' filter dialog
Manage Mods reuses dialog_mod_filters.xml (for its version/loader update-check filter), which now also carries the Modrinth/CurseForge/ Both engine picker added for the search screens. That picker doesn't apply here — Manage Mods filters already-installed mods, it doesn't run a search against an engine — so hide both the label and the spinner when this dialog is shown from ManageModsFragment.
1 parent cfff573 commit 367c03e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/fragments/ManageModsFragment.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,15 @@ private void showFilterDialog() {
158158
Button applyButton = dialog.findViewById(R.id.search_mod_apply_filters);
159159
Spinner loaderSpinner = dialog.findViewById(R.id.search_mod_loader_spinner);
160160

161+
// This dialog is shared with the mod/modpack search screens, which also
162+
// show a Modrinth/CurseForge/Both engine picker — not applicable here,
163+
// since Manage Mods just filters already-installed mods by version/loader
164+
// for update checking, it doesn't pick a search engine.
165+
View engineLabel = dialog.findViewById(R.id.search_mod_engine_textview);
166+
View engineSpinner = dialog.findViewById(R.id.search_mod_engine_spinner);
167+
if (engineLabel != null) engineLabel.setVisibility(View.GONE);
168+
if (engineSpinner != null) engineSpinner.setVisibility(View.GONE);
169+
161170
if (versionText == null || selectVersion == null || applyButton == null) return;
162171

163172
versionText.setText(savedVersion);

0 commit comments

Comments
 (0)