File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed
src/main/java/com/shuzijun/leetcode/plugin/actions Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change 11package com .shuzijun .leetcode .plugin .actions ;
22
33import com .intellij .openapi .actionSystem .AnActionEvent ;
4+ import com .intellij .openapi .application .ApplicationManager ;
45import com .shuzijun .leetcode .plugin .manager .ViewManager ;
56import com .shuzijun .leetcode .plugin .model .Config ;
67import com .shuzijun .leetcode .plugin .setting .PersistentConfig ;
@@ -62,20 +63,28 @@ public void perform(AnActionEvent anActionEvent, Config config) {
6263 }
6364 }
6465
65- LoginFrame loginFrame = new LoginFrame (anActionEvent .getProject (),tree );
66+ LoginFrame loginFrame = new LoginFrame (anActionEvent .getProject (), tree );
6667 if (URLUtils .leetcodecn .equals (URLUtils .getLeetcodeHost ())) {
67- if (!loginFrame .ajaxLogin (config )){
68- loginFrame .loadComponent ();
69- loginFrame .show ();
68+ if (!loginFrame .ajaxLogin (config )) {
69+ ApplicationManager .getApplication ().invokeLater (new Runnable () {
70+ @ Override
71+ public void run () {
72+ loginFrame .loadComponent ();
73+ loginFrame .show ();
74+ }
75+ });
7076 }
7177 } else {
72- loginFrame .loadComponent ();
73- loginFrame .show ();
78+ ApplicationManager .getApplication ().invokeLater (new Runnable () {
79+ @ Override
80+ public void run () {
81+ loginFrame .loadComponent ();
82+ loginFrame .show ();
83+ }
84+ });
7485 }
7586
7687 }
7788
7889
79-
80-
8190}
You can’t perform that action at this time.
0 commit comments