Browse Source

minor fixes

master
Craig Raw 2 years ago
parent
commit
f2f6e639dc
  1. 2
      src/main/java/com/sparrowwallet/sparrow/SparrowWallet.java
  2. 4
      src/main/java/com/sparrowwallet/sparrow/terminal/wallet/LoadWallet.java

2
src/main/java/com/sparrowwallet/sparrow/SparrowWallet.java

@ -86,7 +86,7 @@ public class SparrowWallet {
SLF4JBridgeHandler.removeHandlersForRootLogger();
SLF4JBridgeHandler.install();
if(args.terminal) {
if(args.terminal || java.awt.GraphicsEnvironment.isHeadless()) {
PlatformImpl.setTaskbarApplication(false);
com.sun.javafx.application.LauncherImpl.launchApplication(SparrowTerminal.class, SparrowWalletPreloader.class, argv);
} else {

4
src/main/java/com/sparrowwallet/sparrow/terminal/wallet/LoadWallet.java

@ -150,7 +150,9 @@ public class LoadWallet implements Runnable {
Set<File> walletFiles = new LinkedHashSet<>();
walletFiles.add(storage.getWalletFile());
walletFiles.addAll(Config.get().getRecentWalletFiles().stream().limit(MAX_RECENT_WALLETS - 1).collect(Collectors.toList()));
if(Config.get().getRecentWalletFiles() != null) {
walletFiles.addAll(Config.get().getRecentWalletFiles().stream().limit(MAX_RECENT_WALLETS - 1).collect(Collectors.toList()));
}
Config.get().setRecentWalletFiles(Config.get().isLoadRecentWallets() ? new ArrayList<>(walletFiles) : Collections.emptyList());
}

Loading…
Cancel
Save