allow short wallet display name retrieval

This commit is contained in:
Craig Raw 2022-01-31 19:12:36 +02:00
parent 61317f15ac
commit 9618c73c50

View file

@ -73,7 +73,7 @@ public class Wallet extends Persistable implements Comparable<Wallet> {
return childWallets.isEmpty() ? name : name + "-" + (label != null && !label.isEmpty() ? label : getAutomaticName());
}
return getMasterWallet().getName() + "-" + getDisplayName(this);
return getMasterWallet().getName() + "-" + getDisplayName();
}
public String getFullDisplayName() {
@ -81,11 +81,11 @@ public class Wallet extends Persistable implements Comparable<Wallet> {
return childWallets.isEmpty() ? name : name + " - " + (label != null && !label.isEmpty() ? label : getAutomaticName());
}
return getMasterWallet().getName() + " - " + getDisplayName(this);
return getMasterWallet().getName() + " - " + getDisplayName();
}
private String getDisplayName(Wallet wallet) {
return wallet.label != null && !wallet.label.isEmpty() ? wallet.label : wallet.name;
public String getDisplayName() {
return label != null && !label.isEmpty() ? label : (isMasterWallet() ? getAutomaticName() : name);
}
public String getAutomaticName() {