mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2026-08-10 00:27:00 +00:00
indicate number of utxos selected in utxos tab
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user