Skip to content

Commit a746c0b

Browse files
authored
Merge pull request #109 from shuzijun/gradle
Fix as sync
2 parents 6595e7c + 1512537 commit a746c0b

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

src/main/java/com/shuzijun/leetcode/plugin/actions/LoginAction.java

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.shuzijun.leetcode.plugin.actions;
22

33
import com.intellij.openapi.actionSystem.AnActionEvent;
4+
import com.intellij.openapi.application.ApplicationManager;
45
import com.shuzijun.leetcode.plugin.manager.ViewManager;
56
import com.shuzijun.leetcode.plugin.model.Config;
67
import 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
}

src/main/resources/META-INF/plugin.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
<change-notes><![CDATA[
115115
<ul>
116116
<li>v6.0<br>
117-
1.修改leetcode.com登录方式, <a href="https://github.com/shuzijun/leetcode-editor/blob/master/LoginHelp_ZH.md">参考</a><br>
117+
1.修改leetcode.com登录方式, <a href="https://github.com/shuzijun/leetcode-editor/blob/master/doc/LoginHelp_ZH.md">参考</a><br>
118118
2.修复快捷键无法使用问题<br>
119119
3.修复题目名称不展示中文问题<br>
120120
4.增加提交时自动保存<br>
@@ -123,7 +123,7 @@
123123
7.优化题目描述超长<br>
124124
</li>
125125
<li>v6.0<br>
126-
1.Modify leetcode.com login method, <a href="https://github.com/shuzijun/leetcode-editor/blob/master/LoginHelp_ZH.md">help</a><br>
126+
1.Modify leetcode.com login method, <a href="https://github.com/shuzijun/leetcode-editor/blob/master/doc/LoginHelp_ZH.md">help</a><br>
127127
2.Fix the problem that the shortcut keys cannot be used<br>
128128
3.Fix the problem that the title name does not show Chinese<br>
129129
4.Automatically save when adding commits<br>

0 commit comments

Comments
 (0)