mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Remove load and activate methods from ThemePackage
I assume these were added to speed theme loading, but now that promises are being used it complicates overriding methods. From my tests removing these methods and relying on Atom Package's methods added ~2 ms per theme.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
Q = require 'q'
|
||||
AtomPackage = require './atom-package'
|
||||
Package = require './package'
|
||||
|
||||
@@ -15,16 +16,3 @@ class ThemePackage extends AtomPackage
|
||||
|
||||
disable: ->
|
||||
atom.config.removeAtKeyPath('core.themes', @metadata.name)
|
||||
|
||||
load: ->
|
||||
@measure 'loadTime', =>
|
||||
try
|
||||
@metadata ?= Package.loadMetadata(@path)
|
||||
catch e
|
||||
console.warn "Failed to load theme named '#{@name}'", e.stack ? e
|
||||
this
|
||||
|
||||
activate: ->
|
||||
@measure 'activateTime', =>
|
||||
@loadStylesheets()
|
||||
@activateNow()
|
||||
|
||||
Reference in New Issue
Block a user