Skip to content

Commit

Permalink
Atom restart no longer needed for custom icons packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvestre Herrera committed Aug 13, 2015
1 parent ee509e6 commit 8451e7e
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions lib/config.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@ module.exports =
apply: ->
root = document.documentElement

# Check if there are any file-type-icon package
loadedPackages = atom.packages.getLoadedPackages()
iconPacks = ['file-icons', 'file-type-icons', 'seti-icons', 'envygeeks-file-icons']
# Check if there are custom icons packages

loadedPackages.forEach (pack, i) ->
if (iconPacks.indexOf(pack.name) >= 0)
root.classList.add('dont-change-icons')
checkPacks = () ->
root.classList.remove('dont-change-icons')

loadedPackages = atom.packages.getActivePackages()
iconPacks = ['file-icons', 'file-type-icons', 'seti-icons', 'envygeeks-file-icons']

loadedPackages.forEach (pack, i) ->
if (iconPacks.indexOf(pack.name) >= 0)
root.classList.add('dont-change-icons')

atom.packages.onDidActivatePackage () -> checkPacks()
atom.packages.onDidDeactivatePackage () -> checkPacks()

# Accent color

Expand Down

0 comments on commit 8451e7e

Please sign in to comment.