|
@@ -339,13 +339,20 @@ public partial class MainWindow : IPanelHostControl
|
|
|
|
|
|
if (startupException is null && App.DatabaseSettings.Autologin)
|
|
|
{
|
|
|
- Logger.Send(LogType.Information, "", "Logging in");
|
|
|
- progress.Report("Logging in");
|
|
|
- loginStatus = TryAutoLogin();
|
|
|
- if(loginStatus == ValidationStatus.VALID)
|
|
|
+ try
|
|
|
+ {
|
|
|
+ Logger.Send(LogType.Information, "", "Logging in");
|
|
|
+ progress.Report("Logging in");
|
|
|
+ loginStatus = TryAutoLogin();
|
|
|
+ if(loginStatus == ValidationStatus.VALID)
|
|
|
+ {
|
|
|
+ // Do the AfterLogin() here so that we aren't opening and closing progress windows again and again.
|
|
|
+ AfterLogin(progress);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch(Exception e)
|
|
|
{
|
|
|
- // Do the AfterLogin() here so that we aren't opening and closing progress windows again and again.
|
|
|
- AfterLogin(progress);
|
|
|
+ startupException = e;
|
|
|
}
|
|
|
}
|
|
|
});
|