Skip to content
This repository has been archived by the owner on Nov 12, 2018. It is now read-only.

Fix #542 #612

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/inject/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ class Injector {
});
// recover to the last chat user
ipcRenderer.on('show-wechat-window', () => {
const currentUser = angular.element('#chatArea').scope().currentUser;

if (currentUser) {
this.lastUser = currentUser;
}
if (this.lastUser != null) {
angular.element('.chat_list').scope().itemClick(this.lastUser);
}
Expand Down
2 changes: 1 addition & 1 deletion src/windows/controllers/wechat.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class WeChatWindow {
}

registerLocalShortcut() {
electronLocalShortcut.register(this.wechatWindow, 'CommandOrControl + H', () => {
electronLocalShortcut.register(this.wechatWindow, 'CommandOrControl+H', () => {
this.wechatWindow.hide();
});
}
Expand Down