mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
Merge branch 'master' into 'master'
[Mobile] Fix selected deck on activate See merge request core-developers/forge!4143
This commit is contained in:
@@ -231,10 +231,11 @@ public class FDeckChooser extends FScreen {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onActivate() {
|
public void onActivate() {
|
||||||
//somehow a loaded deck state from startup don't refresh accordingly for imageview so refresh it on first activation
|
String aiSelected = "";
|
||||||
if(firstactivation) {
|
if(isAi() && firstactivation) {
|
||||||
needRefreshOnActivate = true;
|
needRefreshOnActivate = true;
|
||||||
firstactivation = false;
|
firstactivation = false;
|
||||||
|
aiSelected = lstDecks.getSelectedItem().getDeck().toString();
|
||||||
}
|
}
|
||||||
if (needRefreshOnActivate) {
|
if (needRefreshOnActivate) {
|
||||||
needRefreshOnActivate = false;
|
needRefreshOnActivate = false;
|
||||||
@@ -290,6 +291,9 @@ public class FDeckChooser extends FScreen {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
if (isAi())
|
||||||
|
lstDecks.setSelectedString(aiSelected);
|
||||||
|
else
|
||||||
lstDecks.setSelectedString(DeckPreferences.getCurrentDeck());
|
lstDecks.setSelectedString(DeckPreferences.getCurrentDeck());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user