mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-23 20:36:44 +00:00
indicate number of utxos selected in utxos tab
This commit is contained in:
parent
486027f153
commit
0be73efdc1
3 changed files with 9 additions and 3 deletions
2
drongo
2
drongo
|
@ -1 +1 @@
|
|||
Subproject commit 6d0d5b7f62781c15f16d4ce0b6e27d2298122d1e
|
||||
Subproject commit 377843a4a5a3b00fc6267e8aaeeff86e6899ce46
|
|
@ -1634,7 +1634,7 @@ public class SendController extends WalletFormController implements Initializabl
|
|||
}
|
||||
|
||||
private class PrivacyAnalysisTooltip extends VBox {
|
||||
private List<Label> analysisLabels = new ArrayList<>();
|
||||
private final List<Label> analysisLabels = new ArrayList<>();
|
||||
|
||||
public PrivacyAnalysisTooltip(WalletTransaction walletTransaction) {
|
||||
List<Payment> payments = walletTransaction.getPayments();
|
||||
|
|
|
@ -190,16 +190,22 @@ public class UtxosController extends WalletFormController implements Initializab
|
|||
List<Entry> selectedEntries = utxosTable.getSelectionModel().getSelectedCells().stream().filter(tp -> tp.getTreeItem() != null).map(tp -> tp.getTreeItem().getValue()).collect(Collectors.toList());
|
||||
utxosChart.select(selectedEntries);
|
||||
updateButtons(Config.get().getBitcoinUnit());
|
||||
updateUtxoCount(getWalletForm().getWalletUtxosEntry());
|
||||
});
|
||||
}
|
||||
|
||||
private void updateFields(WalletUtxosEntry walletUtxosEntry) {
|
||||
balance.setValue(walletUtxosEntry.getBalance());
|
||||
mempoolBalance.setValue(walletUtxosEntry.getMempoolBalance());
|
||||
utxoCount.setText(walletUtxosEntry.getChildren() != null ? Integer.toString(walletUtxosEntry.getChildren().size()) : "0");
|
||||
updateUtxoCount(walletUtxosEntry);
|
||||
selectAll.setDisable(walletUtxosEntry.getChildren() == null || walletUtxosEntry.getChildren().size() == 0);
|
||||
}
|
||||
|
||||
private void updateUtxoCount(WalletUtxosEntry walletUtxosEntry) {
|
||||
int selectedCount = utxosTable.getSelectionModel().getSelectedCells().size();
|
||||
utxoCount.setText((selectedCount > 0 ? selectedCount + "/" : "") + (walletUtxosEntry.getChildren() != null ? Integer.toString(walletUtxosEntry.getChildren().size()) : "0"));
|
||||
}
|
||||
|
||||
private boolean canWalletMix() {
|
||||
return WhirlpoolServices.canWalletMix(getWalletForm().getWallet());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue