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 1
1
package com .shuzijun .leetcode .plugin .actions ;
2
2
3
3
import com .intellij .openapi .actionSystem .AnActionEvent ;
4
+ import com .intellij .openapi .application .ApplicationManager ;
4
5
import com .shuzijun .leetcode .plugin .manager .ViewManager ;
5
6
import com .shuzijun .leetcode .plugin .model .Config ;
6
7
import com .shuzijun .leetcode .plugin .setting .PersistentConfig ;
@@ -62,20 +63,28 @@ public void perform(AnActionEvent anActionEvent, Config config) {
62
63
}
63
64
}
64
65
65
- LoginFrame loginFrame = new LoginFrame (anActionEvent .getProject (),tree );
66
+ LoginFrame loginFrame = new LoginFrame (anActionEvent .getProject (), tree );
66
67
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
+ });
70
76
}
71
77
} 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
+ });
74
85
}
75
86
76
87
}
77
88
78
89
79
-
80
-
81
90
}
You can’t perform that action at this time.
0 commit comments