mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
[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:
@@ -86,7 +86,10 @@ public class FDeckViewer extends FScreen {
|
|||||||
public static void copyDeckToClipboard(Deck deck) {
|
public static void copyDeckToClipboard(Deck deck) {
|
||||||
final String nl = System.getProperty("line.separator");
|
final String nl = System.getProperty("line.separator");
|
||||||
final StringBuilder deckList = new StringBuilder();
|
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);
|
deckList.append(dName == null ? "" : dName + nl + nl);
|
||||||
|
|
||||||
for (DeckSection s : DeckSection.values()){
|
for (DeckSection s : DeckSection.values()){
|
||||||
|
|||||||
Reference in New Issue
Block a user