Skip to content

Commit

Permalink
- publisher name in windows image
Browse files Browse the repository at this point in the history
- fixed a bug in determining save location
  • Loading branch information
BeanVortex committed Apr 26, 2023
1 parent b86cb51 commit d8218de
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ jlink {
if (OperatingSystem.current().windows) {
appVersion = version
installerName = 'BitKip'
installerOptions = ['--win-menu', '--win-shortcut', '--icon', 'src/main/resources/ir/darkdeveloper/bitkip/icons/logo.ico']
installerOptions = ['--win-menu', '--win-shortcut',
'--icon', 'src/main/resources/ir/darkdeveloper/bitkip/icons/logo.ico',
'--vendor', 'DarkDeveloper']
imageOptions = ['--icon', 'src/main/resources/ir/darkdeveloper/bitkip/icons/logo.ico']
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ private void autoFillLocationAndSizeAndName() {
var url = urlField.getText();
var connection = NewDownloadUtils.connect(url, 3000, 3000);
var executor = Executors.newFixedThreadPool(2);
CompletableFuture<Void> fileNameLocationFuture = CompletableFuture.completedFuture(null);
fileNameLocationFuture = NewDownloadUtils.prepareFileNameAndFieldsAsync(connection, url, nameField, executor)
var fileNameLocationFuture = NewDownloadUtils.prepareFileNameAndFieldsAsync(connection, url, nameField, executor)
.thenAccept(this::setLocation);
var sizeFuture = NewDownloadUtils.prepareFileSizeAndFieldsAsync(connection, urlField, sizeLabel, chunksField, bytesField, dm, executor);
CompletableFuture.allOf(fileNameLocationFuture, sizeFuture)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,6 @@ public static void determineLocationAndQueue(TextField locationField, String fil
if (fileName == null || fileName.isBlank())
return;
for (var entry : extensions.entrySet()) {
// empty is set for others
if (entry.getValue().isEmpty()) {
if (!locationField.getText().equals(othersPath))
locationField.setText(othersPath);
determineQueue(dm, entry.getKey());
return;
}
var matched = entry.getValue().stream().anyMatch(fileName::endsWith);
if (matched) {
var path = defaultDownloadPaths.stream().filter(p -> p.contains(entry.getKey()))
Expand All @@ -142,6 +135,13 @@ public static void determineLocationAndQueue(TextField locationField, String fil
determineQueue(dm, entry.getKey());
return;
}
// empty is set for others
if (entry.getValue().isEmpty()) {
if (!locationField.getText().equals(othersPath))
locationField.setText(othersPath);
determineQueue(dm, entry.getKey());
return;
}
}
});
}
Expand Down

0 comments on commit d8218de

Please sign in to comment.