 fs = require 'fs-plus'
 shell = require 'shell'
 {View} = require 'atom-space-pen-views'
+{CompositeDisposable} = require 'atom'
 
 ErrorView = require './error-view'
 PackageCard = require './package-card'

      @pack.activateConfig()

  detached: ->
    # @unsubscribe()

  beforeShow: (opts) ->
    if opts?.back

    @sections.append(new PackageReadmeView(readme))

  subscribeToPackageManager: ->
    @disposables.add @packageManager.on 'theme-installed package-installed', (pack) =>
      return unless @pack.name is pack.name

      @loadPackage()
      @updateInstalledState()

    @disposables.add @packageManager.on 'theme-uninstalled package-uninstalled', (pack) =>
      @updateInstalledState() if @pack.name is pack.name

    @disposables.add @packageManager.on 'theme-updated package-updated', (pack) =>
      return unless @pack.name is pack.name

      @loadPackage()
