mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-25 09:36:44 +00:00
respect wallet labels when displaying name
This commit is contained in:
parent
bdb9900d8d
commit
6c03c4106a
1 changed files with 13 additions and 4 deletions
|
@ -69,18 +69,27 @@ public class Wallet extends Persistable implements Comparable<Wallet> {
|
||||||
|
|
||||||
public String getFullName() {
|
public String getFullName() {
|
||||||
if(isMasterWallet()) {
|
if(isMasterWallet()) {
|
||||||
return name;
|
return childWallets.isEmpty() ? name : name + "-" + (label != null && !label.isEmpty() ? label : getAutomaticName());
|
||||||
}
|
}
|
||||||
|
|
||||||
return getMasterWallet().getName() + "-" + name;
|
return getMasterWallet().getName() + "-" + getDisplayName(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFullDisplayName() {
|
public String getFullDisplayName() {
|
||||||
if(isMasterWallet()) {
|
if(isMasterWallet()) {
|
||||||
return name;
|
return childWallets.isEmpty() ? name : name + " - " + (label != null && !label.isEmpty() ? label : getAutomaticName());
|
||||||
}
|
}
|
||||||
|
|
||||||
return getMasterWallet().getName() + " - " + name;
|
return getMasterWallet().getName() + " - " + getDisplayName(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getDisplayName(Wallet wallet) {
|
||||||
|
return wallet.label != null && !wallet.label.isEmpty() ? wallet.label : wallet.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAutomaticName() {
|
||||||
|
int account = getAccountIndex();
|
||||||
|
return (account < 0 || account > 9) ? getName() : (!isWhirlpoolMasterWallet() || account > 1 ? "Account #" + account : "Deposit");
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMasterName() {
|
public String getMasterName() {
|
||||||
|
|
Loading…
Reference in a new issue