mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Pass app version via window's url.
We could save the sync message of atom.getVersion().
This commit is contained in:
@@ -104,7 +104,7 @@ class Atom extends Model
|
||||
|
||||
# Private: Get the version of the Atom application.
|
||||
@getVersion: ->
|
||||
@version ?= app.getVersion()
|
||||
@version ?= @getLoadSettings().appVersion
|
||||
|
||||
# Private: Determine whether the current version is an official release.
|
||||
@isReleasedVersion: ->
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
BrowserWindow = require 'browser-window'
|
||||
Menu = require 'menu'
|
||||
ContextMenu = require './context-menu'
|
||||
app = require 'app'
|
||||
dialog = require 'dialog'
|
||||
ipc = require 'ipc'
|
||||
path = require 'path'
|
||||
@@ -32,6 +33,7 @@ class AtomWindow
|
||||
|
||||
loadSettings = _.extend({}, settings)
|
||||
loadSettings.windowState ?= '{}'
|
||||
loadSettings.appVersion = app.getVersion()
|
||||
|
||||
# Only send to the first non-spec window created
|
||||
if @constructor.includeShellLoadTime and not @isSpec
|
||||
|
||||
Reference in New Issue
Block a user