mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
[Mobile] fix netdecks not loading decks imageview on activation
- Adds a different method to select the netdeck category on imageview
This commit is contained in:
@@ -68,6 +68,7 @@ public class FDeckChooser extends FScreen {
|
||||
private NetDeckArchiveLegacy NetDeckArchiveLegacy;
|
||||
private NetDeckArchiveVintage NetDeckArchiveVintage;
|
||||
private boolean refreshingDeckType;
|
||||
private boolean firstActivation = true;
|
||||
|
||||
private final DeckManager lstDecks;
|
||||
private final FButton btnNewDeck = new FButton(Localizer.getInstance().getMessage("lblNewDeck"));
|
||||
@@ -230,11 +231,16 @@ public class FDeckChooser extends FScreen {
|
||||
|
||||
@Override
|
||||
public void onActivate() {
|
||||
//todo how to get the lobby player net deck category when activating the deck manager in homescreen?
|
||||
String selectedDeck = "";
|
||||
if (lstDecks.getSelectedItem() != null)
|
||||
selectedDeck = lstDecks.getSelectedItem().getDeck().toString();
|
||||
if (needRefreshOnActivate) {
|
||||
if (lstDecks.getConfig().getViewIndex() == 1 && selectedDeckType.name().startsWith("NET_")) {
|
||||
if (firstActivation) {
|
||||
firstActivation = false;
|
||||
lstDecks.refresh();
|
||||
lstDecks.setSelectedString(selectedDeck);
|
||||
}
|
||||
} else if (needRefreshOnActivate) {
|
||||
needRefreshOnActivate = false;
|
||||
refreshDecksList(selectedDeckType, true, null);
|
||||
switch (lstDecks.getGameType()) {
|
||||
|
||||
Reference in New Issue
Block a user