Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

add disable atom's default tree-view on file-tree package load #25

Closed
wants to merge 2 commits into from
Closed

add disable atom's default tree-view on file-tree package load #25

wants to merge 2 commits into from

Conversation

knowbody
Copy link

@knowbody knowbody commented Jun 3, 2015

This is in reference to #3

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@@ -17,6 +17,14 @@ var subscriptions: ?CompositeDisposable = null;

module.exports = {
activate(state: ?FileTreeControllerState): void {

// disable atom's default tree view
if (atom.config.get('core.disabledPackages').length === 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you keep a reference to the config object to simplify this?

var coreDisabledPackages = atom.config.get('core.disabledPackages');
if (coreDisabledPackages.length === 0 ||
    coreDisabledPackages.indexOf('tree-view') === -1) {
  atom.config.pushAtKeyPath('core.disabledPackages', 'tree-view');
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@knowbody
Copy link
Author

knowbody commented Jun 7, 2015

@ssorallen anything else you would like me to change?

@ssorallen
Copy link
Contributor

@knowbody, we are looking at some additions to your pull request internally. Specifically, when you disable the nuclide-file-tree package the bundled Atom file-tree should re-enable.

@knowbody
Copy link
Author

knowbody commented Jun 8, 2015

👍 cool, @ssorallen let me know if I can help somehow

@knowbody
Copy link
Author

@ssorallen this can be closed as you fixed it internally now with:

// We need to check if the package is already disabled, otherwise Atom will
// add it to the 'core.disabledPackages' config multiple times.
if (!atom.packages.isPackageDisabled('tree-view')) {
  atom.packages.disablePackage('tree-view');
}

@ssorallen
Copy link
Contributor

Great. Thanks for pull request, it prompted us to make nuclide-file-tree interact with Atom's tree-view better. If you still have problems, please comment or re-open the PR/issue.

@ssorallen ssorallen closed this Jun 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants