fix version update hyperlink appearing multiple times

This commit is contained in:
Craig Raw 2021-11-10 16:13:23 +02:00
parent fb85277894
commit c3778b6419
3 changed files with 11 additions and 4 deletions

2
drongo

@ -1 +1 @@
Subproject commit 6c03c4106ae612c0b80370c3ed5495b1ba9225bc Subproject commit f46d6277551cdb69286fbc3a6e536e0542cb7170

View file

@ -1957,8 +1957,15 @@ public class AppController implements Initializable {
AppServices.get().getApplication().getHostServices().showDocument("https://www.sparrowwallet.com/download"); AppServices.get().getApplication().getHostServices().showDocument("https://www.sparrowwallet.com/download");
}); });
if(statusBar.getRightItems().size() > 0 && statusBar.getRightItems().get(0) instanceof Hyperlink) { Hyperlink existingUpdateLabel = null;
statusBar.getRightItems().remove(0); for(Node node : statusBar.getRightItems()) {
if(node instanceof Hyperlink) {
existingUpdateLabel = (Hyperlink)node;
}
}
if(existingUpdateLabel != null) {
statusBar.getRightItems().remove(existingUpdateLabel);
} }
statusBar.getRightItems().add(0, versionUpdateLabel); statusBar.getRightItems().add(0, versionUpdateLabel);

View file

@ -31,7 +31,7 @@
<Fieldset inputGrow="SOMETIMES" text="Mix To Settings"> <Fieldset inputGrow="SOMETIMES" text="Mix To Settings">
<Field text="Mix to wallet:"> <Field text="Mix to wallet:">
<ComboBox fx:id="mixToWallets" prefWidth="160" promptText="None available" /> <ComboBox fx:id="mixToWallets" prefWidth="160" promptText="None available" />
<HelpLabel helpText="Select a single signature wallet that is already open to mix to."/> <HelpLabel helpText="Select an open wallet to mix to."/>
</Field> </Field>
<Field text="Minimum mixes:"> <Field text="Minimum mixes:">
<Spinner fx:id="minMixes" editable="true" prefWidth="90" /> <Spinner fx:id="minMixes" editable="true" prefWidth="90" />