Skip to content
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

[question] how can I collapse / expand all mail accounts? #121

Open
ioweb-gr opened this issue Dec 10, 2022 · 1 comment
Open

[question] how can I collapse / expand all mail accounts? #121

ioweb-gr opened this issue Dec 10, 2022 · 1 comment

Comments

@ioweb-gr
Copy link

I'm trying to see if it's possible to configure a shortcut to collapse / expand all accounts. Any ideas how to achieve this?

Any help is appreciated

@morat523035
Copy link

morat523035 commented Dec 11, 2022

Try something like:

  • collapse all tree nodes in folder pane
(function () {
  var f = window.gFolderTreeView;
  for (var i = f.rowCount - 1; i >= 0; i--) {
    if (f.isContainer(i) && f.isContainerOpen(i)) {
      f.toggleOpenState(i);
    }
  }
})();
  • expand all tree nodes in folder pane
(function () {
  var f = window.gFolderTreeView;
  for (var i = 0; i < f.rowCount; i++) {
    if (f.isContainer(i) && !f.isContainerOpen(i)) {
      f.toggleOpenState(i);
    }
  }
})();

Similar thread
http://forums.mozillazine.org/viewtopic.php?p=14936756#p14936756

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants