mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-22 15:15: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,10 +407,16 @@ class DraftStore
|
|||
title = if options.newDraft then "New Message" else "Message"
|
||||
|
||||
save.then =>
|
||||
atom.newWindow
|
||||
title: title
|
||||
windowType: "composer"
|
||||
windowProps: _.extend(options, {draftClientId})
|
||||
app = require('remote').getGlobal('application')
|
||||
existing = app.windowManager.windowWithPropsMatching({draftClientId})
|
||||
if existing
|
||||
existing.restore() if existing.isMinimized()
|
||||
existing.focus()
|
||||
else
|
||||
atom.newWindow
|
||||
title: title
|
||||
windowType: "composer"
|
||||
windowProps: _.extend(options, {draftClientId})
|
||||
|
||||
_onHandleMailtoLink: (urlString) =>
|
||||
account = AccountStore.current()
|
||||
|
|
Loading…
Reference in a new issue