various minor ui fixes including update screens after includemempooloutputs changed

This commit is contained in:
Craig Raw 2021-04-21 13:09:31 +02:00
parent f377f97931
commit b465b9fdaf
7 changed files with 29 additions and 2 deletions

2
drongo

@ -1 +1 @@
Subproject commit b0d37fe8fe6a4bec756e8c24bee562d1a377cf10 Subproject commit 0a43f9f6a8d0fd849e6552b936f8d15fafe800fa

View file

@ -0,0 +1,8 @@
package com.sparrowwallet.sparrow.event;
/**
* Empty class to indicate the includeMempoolOutputs config setting has changed
*/
public class IncludeMempoolOutputsChangedEvent {
}

View file

@ -119,6 +119,7 @@ public class GeneralPreferencesController extends PreferencesDetailController {
}); });
includeMempoolOutputs.selectedProperty().addListener((observableValue, oldValue, newValue) -> { includeMempoolOutputs.selectedProperty().addListener((observableValue, oldValue, newValue) -> {
config.setIncludeMempoolOutputs(newValue); config.setIncludeMempoolOutputs(newValue);
EventManager.get().post(new IncludeMempoolOutputsChangedEvent());
}); });
notifyNewTransactions.setSelected(config.isNotifyNewTransactions()); notifyNewTransactions.setSelected(config.isNotifyNewTransactions());

View file

@ -289,6 +289,8 @@ public class PaymentController extends WalletFormController implements Initializ
fiatAmount.setText(""); fiatAmount.setText("");
setSendMax(false); setSendMax(false);
amountStatus.setVisible(false);
} }
public void setMaxInput(ActionEvent event) { public void setMaxInput(ActionEvent event) {

View file

@ -338,7 +338,7 @@ public class SendController extends WalletFormController implements Initializabl
setTargetBlocks(getTargetBlocks(feeRate)); setTargetBlocks(getTargetBlocks(feeRate));
setFeeRangeRate(feeRate); setFeeRangeRate(feeRate);
if(walletTransaction.getFee() != getFeeValueSats()) { if(walletTransaction.getFee() != getFeeValueSats() && feeRate > getMinimumFeeRate()) {
setFeeValueSats(walletTransaction.getFee()); setFeeValueSats(walletTransaction.getFee());
} }
} else { } else {
@ -1033,4 +1033,9 @@ public class SendController extends WalletFormController implements Initializabl
} }
} }
} }
@Subscribe
public void includeMempoolOutputsChangedEvent(IncludeMempoolOutputsChangedEvent event) {
updateTransaction();
}
} }

View file

@ -26,6 +26,7 @@ import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URL;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.Collections;
import java.util.Locale; import java.util.Locale;
import java.util.ResourceBundle; import java.util.ResourceBundle;
@ -226,4 +227,9 @@ public class TransactionsController extends WalletFormController implements Init
transactionsTable.refresh(); transactionsTable.refresh();
} }
} }
@Subscribe
public void includeMempoolOutputsChangedEvent(IncludeMempoolOutputsChangedEvent event) {
walletHistoryChanged(new WalletHistoryChangedEvent(getWalletForm().getWallet(), getWalletForm().getStorage(), Collections.emptyList()));
}
} }

View file

@ -160,4 +160,9 @@ public class UtxosController extends WalletFormController implements Initializab
utxosTable.refresh(); utxosTable.refresh();
} }
} }
@Subscribe
public void includeMempoolOutputsChangedEvent(IncludeMempoolOutputsChangedEvent event) {
utxosTable.refresh();
}
} }