Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,12 @@ private void populateCards() {

// K2GO-445: the group's members (the IDE, its add-ons, its build assets), same filtering as the
// grid. If all are filtered out, drop the empty group tile too.
// K2GO-443: each member carries its own glyph (they shared the code "</>" before): Code on the Go
// = code, Add-ons = extension (puzzle), Build assets = box. Drives the row AND the action-sheet header.
codeDevMembers.add(new Card("code", getString(R.string.k2go_card_code), false, R.drawable.ic_card_code));
codeDevMembers.add(new Card("code-addons", getString(R.string.k2go_card_code_addons), false, R.drawable.ic_card_addons));
codeDevMembers.add(new Card("code-assets", getString(R.string.k2go_card_code_assets), false, R.drawable.ic_card_assets));
// K2GO-443: each member's glyph comes from ModuleCards (the ONE source also used by Module
// management, the module detail and the action-sheet header), so an icon change there flows to
// every surface and never drifts. Code on the Go = code, Add-ons = extension, Build assets = box.
codeDevMembers.add(new Card("code", getString(R.string.k2go_card_code), false, moduleIcon("code")));
codeDevMembers.add(new Card("code-addons", getString(R.string.k2go_card_code_addons), false, moduleIcon("code-addons")));
codeDevMembers.add(new Card("code-assets", getString(R.string.k2go_card_code_assets), false, moduleIcon("code-assets")));
filterHidden(codeDevMembers);
filterHidden(cards);
if (codeDevMembers.isEmpty()) {
Expand Down Expand Up @@ -433,6 +434,14 @@ else if (verdict == org.appdevforall.k2go.system.domain.SystemVerdict.State.NO_S
() -> { if (isAdded()) refreshAfterSheet(c); }); // ADFA-4958: refresh label / drop if hidden
}

/** K2GO-443: a module's canonical glyph from ModuleCards: the single source every surface reads, so a
* per-module icon change is made once and shows in Module management, the detail, the action sheet AND
* the Home members row. The code glyph is a defensive fallback if the endpoint has no backing card. */
private static int moduleIcon(String endpoint) {
ModuleCards.Card c = ModuleCards.byEndpoint(endpoint);
return c != null ? c.imageRes : R.drawable.ic_card_code;
}

/**
* K2GO-445: the members sheet for the "Code on the Go Dev" group. Lists the member modules (name +
* status); a row routes through the SAME onCardClick a grid card uses (open if ready, else the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ public boolean runsOnThisRuntime() {
R.drawable.ic_card_code, false),
new Card("code_addons", R.string.k2go_mod_code_addons_title, R.string.k2go_mod_code_addons_title,
R.string.k2go_mod_code_addons_sub, R.string.k2go_mod_code_addons_desc,
R.drawable.ic_card_code, false), // K2GO-99: offline add-ons gallery (reuses the code icon)
R.drawable.ic_card_addons, false), // K2GO-443: extension glyph (Module management + the action sheet; matches the Home members sheet)
new Card("code_assets", R.string.k2go_mod_code_assets_title, R.string.k2go_mod_code_assets_title,
R.string.k2go_mod_code_assets_sub, R.string.k2go_mod_code_assets_desc,
R.drawable.ic_card_code, false), // K2GO-437: offline build assets (reuses the code icon)
R.drawable.ic_card_assets, false), // K2GO-443: box glyph (Module management + the action sheet; matches the Home members sheet)
new Card("forgejo", R.string.k2go_mod_forgejo_title, R.string.k2go_mod_forgejo_title,
R.string.k2go_mod_forgejo_sub, R.string.k2go_mod_forgejo_desc,
R.drawable.ic_card_forgejo, false),
Expand Down
Loading