mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 21:36:45 +00:00
handle null dates in date cell
This commit is contained in:
parent
3e47a49f49
commit
d6ad7f4808
1 changed files with 5 additions and 1 deletions
|
@ -35,10 +35,14 @@ public class DateCell extends TreeTableCell<Entry, Entry> {
|
||||||
UtxoEntry utxoEntry = (UtxoEntry)entry;
|
UtxoEntry utxoEntry = (UtxoEntry)entry;
|
||||||
if(utxoEntry.getHashIndex().getHeight() <= 0) {
|
if(utxoEntry.getHashIndex().getHeight() <= 0) {
|
||||||
setText("Unconfirmed " + (utxoEntry.getHashIndex().getHeight() < 0 ? "Parent " : "") + (utxoEntry.getWallet().isWhirlpoolMixWallet() ? "(Not yet mixable)" : (utxoEntry.isSpendable() ? "(Spendable)" : "(Not yet spendable)")));
|
setText("Unconfirmed " + (utxoEntry.getHashIndex().getHeight() < 0 ? "Parent " : "") + (utxoEntry.getWallet().isWhirlpoolMixWallet() ? "(Not yet mixable)" : (utxoEntry.isSpendable() ? "(Spendable)" : "(Not yet spendable)")));
|
||||||
} else {
|
setContextMenu(null);
|
||||||
|
} else if(utxoEntry.getHashIndex().getDate() != null) {
|
||||||
String date = DATE_FORMAT.format(utxoEntry.getHashIndex().getDate());
|
String date = DATE_FORMAT.format(utxoEntry.getHashIndex().getDate());
|
||||||
setText(date);
|
setText(date);
|
||||||
setContextMenu(new DateContextMenu(date, utxoEntry.getHashIndex()));
|
setContextMenu(new DateContextMenu(date, utxoEntry.getHashIndex()));
|
||||||
|
} else {
|
||||||
|
setText("Unknown");
|
||||||
|
setContextMenu(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tooltip tooltip = new Tooltip();
|
Tooltip tooltip = new Tooltip();
|
||||||
|
|
Loading…
Reference in a new issue