Fixed various bugs
These are: * different size of addContact- and SettingsButton * default icons in light mode for users and groups (even though they are currently just the version used in dark mode) * wrong preferred size of unnamed "Login" label in LoginScene * unopenable LoginScene for some OS (Debian) * white screen when the current scene is switched Additionally cleaned up code a bit in MessageControl and LoginScene(.java)
This commit is contained in:
@ -136,23 +136,23 @@ public final class LoginScene {
|
||||
|
||||
@FXML
|
||||
private void registerSwitchPressed() {
|
||||
registration = !registration;
|
||||
|
||||
// Make repeat password field and label visible / invisible
|
||||
repeatPasswordField.setVisible(registration);
|
||||
if (loginButton.getText().equals("Login")) {
|
||||
if (!registration) {
|
||||
// case if the current mode is login
|
||||
loginButton.setText("Register");
|
||||
loginButton.setPadding(new Insets(2, 116, 2, 116));
|
||||
registerTextLabel.setText("Already an account?");
|
||||
registerSwitch.setText("Login");
|
||||
offlineModeButton.setDisable(true);
|
||||
} else {
|
||||
// case if the current mode is registration
|
||||
loginButton.setText("Login");
|
||||
loginButton.setPadding(new Insets(2, 125, 2, 125));
|
||||
registerTextLabel.setText("No account yet?");
|
||||
registerSwitch.setText("Register");
|
||||
offlineModeButton.setDisable(false);
|
||||
}
|
||||
registration = !registration;
|
||||
// Make repeat password field and label visible / invisible
|
||||
repeatPasswordField.setVisible(registration);
|
||||
offlineModeButton.setDisable(registration);
|
||||
}
|
||||
|
||||
@FXML
|
||||
@ -167,7 +167,7 @@ public final class LoginScene {
|
||||
localDB.setUser(localDB.getUsers().get(identifier));
|
||||
localDB.initializeUserStorage();
|
||||
localDB.loadUserData();
|
||||
} catch (Exception e) {
|
||||
} catch (final Exception e) {
|
||||
// User storage empty, wrong user name etc. -> default lastSync
|
||||
}
|
||||
return localDB.getLastSync();
|
||||
@ -190,7 +190,7 @@ public final class LoginScene {
|
||||
try {
|
||||
// Try entering offline mode
|
||||
localDB.loadUsers();
|
||||
final User clientUser = (User) localDB.getUsers().get(credentials.getIdentifier());
|
||||
final User clientUser = localDB.getUsers().get(credentials.getIdentifier());
|
||||
if (clientUser == null) throw new EnvoyException("Could not enter offline mode: user name unknown");
|
||||
client.setSender(clientUser);
|
||||
loadChatScene();
|
||||
|
Reference in New Issue
Block a user