Skip to content

Commit

Permalink
track expired state in defaultView method and fix if condition on lsp…
Browse files Browse the repository at this point in the history
… state
  • Loading branch information
Nicolas Borges committed Feb 3, 2025
1 parent 34db4dc commit 9f846b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ public void setToFailed() {
if (lspState != LspState.FAILED) {
ViewVisibilityManager.showLspStartUpFailedView("update");
lspState = LspState.FAILED;
Activator.getEventBroker().post(lspState);
}

Activator.getEventBroker().post(lspState);
}

public LspState getLspState() {
return lspState;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ private ViewVisibilityManager() {
);

public static void showDefaultView(final String source) {
if (Activator.getLoginService().getAuthState().isLoggedIn()) {
var authState = Activator.getLoginService().getAuthState();
if (authState.isExpired()) {
showReAuthView(source);
} else if (authState.isLoggedIn()) {
showChatView(source);
} else {
showLoginView(source);
Expand Down

0 comments on commit 9f846b1

Please sign in to comment.