mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-04-21 01:56:55 -04:00
Apply suggestions from code review
Co-authored-by: Sebastian Stenzel <overheadhunter@users.noreply.github.com>
This commit is contained in:
@@ -6,9 +6,8 @@ public interface IpcMessageListener {
|
||||
|
||||
default void handleMessage(IpcMessage message) {
|
||||
switch (message) {
|
||||
case RevealRunningAppMessage x -> revealRunningApp();
|
||||
case HandleLaunchArgsMessage hlam -> handleLaunchArgs(hlam.args());
|
||||
default -> {}
|
||||
case RevealRunningAppMessage m -> revealRunningApp(); // TODO: rename to _ with JEP 443
|
||||
case HandleLaunchArgsMessage m -> handleLaunchArgs(m.args());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,10 +91,10 @@ public class AwtTrayMenuController implements TrayMenuController {
|
||||
menuItem.setEnabled(a.enabled());
|
||||
menu.add(menuItem);
|
||||
}
|
||||
case SeparatorItem si -> menu.addSeparator();
|
||||
case SubMenuItem smi -> {
|
||||
var submenu = new Menu(smi.title());
|
||||
addChildren(submenu, smi.items());
|
||||
case SeparatorItem s -> menu.addSeparator(); // TODO: rename to _ with JEP 443
|
||||
case SubMenuItem s -> {
|
||||
var submenu = new Menu(s.title());
|
||||
addChildren(submenu, s.items());
|
||||
menu.add(submenu);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,12 +38,12 @@ public class UnlockInvalidMountPointController implements FxController {
|
||||
@FXML
|
||||
public void initialize() {
|
||||
var e = unlockException.get();
|
||||
var translationKeySuffix = switch (e) {
|
||||
case MountPointNotSupportedException x -> "notSupported";
|
||||
case MountPointNotExistsException x -> "notExists";
|
||||
default -> "generic";
|
||||
var translationKey = switch (e) {
|
||||
case MountPointNotSupportedException x -> "unlock.error.customPath.description.notSupported";
|
||||
case MountPointNotExistsException x -> "unlock.error.customPath.description.notExists";
|
||||
default -> "unlock.error.customPath.description.generic";
|
||||
};
|
||||
dialogDescription.setFormat(resourceBundle.getString("unlock.error.customPath.description." + translationKeySuffix));
|
||||
dialogDescription.setFormat(resourceBundle.getString(translationKey));
|
||||
dialogDescription.setArg1(e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user