mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
when hiding empty used addresses, add previously used updated address nodes in sequence
This commit is contained in:
parent
3555a0bd85
commit
2c1f7e181c
1 changed files with 13 additions and 1 deletions
|
@ -121,9 +121,21 @@ public class AddressTreeTable extends CoinTreeTable {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
NodeEntry nodeEntry = new NodeEntry(rootEntry.getWallet(), updatedNode);
|
NodeEntry nodeEntry = new NodeEntry(rootEntry.getWallet(), updatedNode);
|
||||||
|
|
||||||
|
if(Config.get().isHideEmptyUsedAddresses()) {
|
||||||
|
int index = 0;
|
||||||
|
for( ; index < rootEntry.getChildren().size(); index++) {
|
||||||
|
NodeEntry existingEntry = (NodeEntry)rootEntry.getChildren().get(index);
|
||||||
|
if(nodeEntry.compareTo(existingEntry) < 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rootEntry.getChildren().add(index, nodeEntry);
|
||||||
|
} else {
|
||||||
rootEntry.getChildren().add(nodeEntry);
|
rootEntry.getChildren().add(nodeEntry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue