followup: add or remove card option from pay to dropdown as reader becomes available

This commit is contained in:
Craig Raw 2023-02-01 10:07:59 +02:00
parent 4e3491ec64
commit 73dcef9fd1

View file

@ -197,6 +197,13 @@ public class PaymentController extends WalletFormController implements Initializ
} }
} }
}); });
openWallets.setOnShowing(event -> {
if(!openWallets.getItems().contains(nfcCardWallet) && CardApi.isReaderAvailable()) {
openWallets.getItems().add(nfcCardWallet);
} else if(openWallets.getItems().contains(nfcCardWallet) && !CardApi.isReaderAvailable()) {
openWallets.getItems().remove(nfcCardWallet);
}
});
payNymProperty.addListener((observable, oldValue, payNym) -> { payNymProperty.addListener((observable, oldValue, payNym) -> {
updateMixOnlyStatus(payNym); updateMixOnlyStatus(payNym);