mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-02 18:39:06 +08:00
调整show_app快捷键功能的交互逻辑
This commit is contained in:
parent
7cee1a2bbf
commit
80a2fdc812
@ -22,7 +22,11 @@ function getShortcutHandler(shortcut: Shortcut) {
|
|||||||
case 'show_app':
|
case 'show_app':
|
||||||
return (window: BrowserWindow) => {
|
return (window: BrowserWindow) => {
|
||||||
if (window.isVisible()) {
|
if (window.isVisible()) {
|
||||||
window.hide()
|
if (window.isFocused()) {
|
||||||
|
window.hide()
|
||||||
|
} else {
|
||||||
|
window.focus()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
window.show()
|
window.show()
|
||||||
window.focus()
|
window.focus()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user