[Mobile] fix copying commander netdeck to clipboard

- resolves an issue that you can't copy to clipboard commander netdecks and import it again since "Commander" is a decksection
This commit is contained in:
Anthony Calosa
2021-03-11 21:42:44 +08:00
parent b1e6521d53
commit 6594c7f009

View File

@@ -86,7 +86,10 @@ public class FDeckViewer extends FScreen {
public static void copyDeckToClipboard(Deck deck) {
final String nl = System.getProperty("line.separator");
final StringBuilder deckList = new StringBuilder();
final String dName = deck.getName();
String dName = deck.getName();
//fix copying a commander netdeck then importing it again...
if (dName.startsWith("[Commander")||dName.contains("Commander"))
dName = "";
deckList.append(dName == null ? "" : dName + nl + nl);
for (DeckSection s : DeckSection.values()){