We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 870c03d commit 9b959beCopy full SHA for 9b959be
tmc-plugin/src/fi/helsinki/cs/tmc/ui/PreferencesPanel.java
@@ -50,11 +50,15 @@
50
51
private void updateFields() {
52
final Optional<String> email = this.settings.getEmail();
53
+ final Optional<String> username = this.settings.getUsername();
54
final JLabel login = this.loginLabel;
55
final JButton logout = this.logoutButton;
- if (email.isPresent()) {
56
+ if (email.isPresent() && !email.get().isEmpty()) {
57
login.setText("Logged in as " + email.get());
58
logout.setEnabled(true);
59
+ } else if (username.isPresent()) {
60
+ login.setText("Logged in as " + username.get());
61
+ logout.setEnabled(true);
62
} else {
63
login.setText("Not logged in!");
64
logout.setEnabled(false);
0 commit comments