mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-23 07:36:12 +08:00
fix(drafts): Reveal or focus windows for drafts when already open
Fixes T3883
This commit is contained in:
parent
a3dbab332e
commit
cb4d3f2e39
1 changed files with 10 additions and 4 deletions
|
@ -407,6 +407,12 @@ class DraftStore
|
||||||
title = if options.newDraft then "New Message" else "Message"
|
title = if options.newDraft then "New Message" else "Message"
|
||||||
|
|
||||||
save.then =>
|
save.then =>
|
||||||
|
app = require('remote').getGlobal('application')
|
||||||
|
existing = app.windowManager.windowWithPropsMatching({draftClientId})
|
||||||
|
if existing
|
||||||
|
existing.restore() if existing.isMinimized()
|
||||||
|
existing.focus()
|
||||||
|
else
|
||||||
atom.newWindow
|
atom.newWindow
|
||||||
title: title
|
title: title
|
||||||
windowType: "composer"
|
windowType: "composer"
|
||||||
|
|
Loading…
Reference in a new issue