-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto hides tree view on startup #472
Comments
On it. |
Thanks for the quick response :) The latest version that works correctly is 1.7.25. |
Could you please tell me your You can copy the current settings by running this in devtools: copy(atom.config.get("tree-view")); |
Sure, here it is.
|
Köszi! I'll look into this soon. =) |
Okay, I still have no idea why this is happening, but this seems to do the trick: diff --git a/lib/consumers/tree-view.js b/lib/consumers/tree-view.js
index 543970e..e144d5f 100644
--- a/lib/consumers/tree-view.js
+++ b/lib/consumers/tree-view.js
@@ -18,7 +18,18 @@ class TreeView{
this.disposables.add(
atom.packages.onDidActivatePackage(_=> this.checkPanes()),
atom.packages.onDidDeactivatePackage(_=> this.checkPanes()),
- atom.packages.onDidActivateInitialPackages(_=> this.checkPanes()),
+ atom.packages.onDidActivateInitialPackages(() => {
+
+ // [#472] HACK: Show the tree-view if it's not visible at startup.
+ const state = atom.packages.packageStates["tree-view"];
+ if((!state || state.attached) && !this.visible){
+ const workspace = atom.views.getView(atom.workspace);
+ setImmediate(() => atom.commands.dispatch(workspace, "tree-view:show"));
+ console.log("Fixed!");
+ }
+
+ this.checkPanes();
+ }),
this.onDidAttach(_=> {
this.entryElements = this.element[0].getElementsByClassName("entry"); Could you please test this to see if it works? :) The file to edit is |
Actually, it looks like I'll be pushing out another patch release soon enough, so you'll be able to confirm then if this works or not. =) |
@MrBlaise I've cut another patch... please let me know if you're still experiencing this, okay? Thank you! |
@Alhadis Sadly the problem isn't fixed for me :/ |
I have no way to test Ubuntu. :( I'm guessing it's an OS-specific matter... I'll try and look into it later, but right now, Nuclide is top priority. |
@MrBlaise I've submitted a PR to Atom's Try cloning my branch locally and linking it with |
@Alhadis I was just going to do what you suggested, when I saw you released another patch 2.0.3 I've updated to that and now the tree view appears properly. I don't know what changed but it seems like it solved my problem as well :) |
HAHA, I axed usage of Atom's default icon API. It was just dead weight. Didn't expect it would actually solve any issues... what does that tell ya, eh? |
Yes I saw your PR to the atom repo regarding this API, I'm interested in their response :) Keep up the good work and thanks for this amazing package. |
I've updated to the latest file-icons (2.0.1) and strangely my tree view is hidden on startup.
I've disabled every package and it works, if I enable file-icons it will be hidden again. Very annoying since I use tree view all the time.
The text was updated successfully, but these errors were encountered: