Currently, the login screen suffers from two minor bugs. This PR fixes those two bugs.
Login selection
First, pressing the cross in the top-right corner of the login screen will display an error to the user. The expected behaviour is that the application is closed. I have added a check for this button, and when it is pressed the same code will be executed as when the Exit button is pressed.
Cancelling Google login
I removed this second fix because I could not think of a fix without using labels, something CheckStyle did not approve of.
Second, when the user selects the Google Auth, they may have done so by accident or they may have changed their mind. When the user presses the close icon in the top-right corner of the screen, they would expect the application to return to the previous window. Instead, the program continues to ask if they want to save the entered credentials, even though there are no credentials to save.
My solution for this issue is to check when the close icon is pressed, and when it is, to continue the outer loop to the next iteration.
Currently, the login screen suffers from two minor bugs. This PR fixes those two bugs.
Login selection
First, pressing the cross in the top-right corner of the login screen will display an error to the user. The expected behaviour is that the application is closed. I have added a check for this button, and when it is pressed the same code will be executed as when the Exit button is pressed.
Cancelling Google login
I removed this second fix because I could not think of a fix without using labels, something CheckStyle did not approve of. Second, when the user selects the Google Auth, they may have done so by accident or they may have changed their mind. When the user presses the close icon in the top-right corner of the screen, they would expect the application to return to the previous window. Instead, the program continues to ask if they want to save the entered credentials, even though there are no credentials to save. My solution for this issue is to check when the close icon is pressed, and when it is, to continue the outer loop to the next iteration.