Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Save side bar visibility immediately when not in resizing.#7031

Merged
redmunds merged 1 commit intomasterfrom
rlim/save-sidebar-visibility
Feb 28, 2014
Merged

Save side bar visibility immediately when not in resizing.#7031
redmunds merged 1 commit intomasterfrom
rlim/save-sidebar-visibility

Conversation

@RaymondLim
Copy link
Copy Markdown
Contributor

This fixes #7030.

@redmunds redmunds self-assigned this Feb 28, 2014
Comment thread src/utils/Resizer.js
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's not possible to hide/show while resizing, right? If so, isResizing will always be false so I think passing this as a param is misleading. This is an optional param that defaults to false, so this could simply be:

    PreferencesManager.setViewState(elementID, elementPrefs, null);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, if so, the isResizing var does not need to be module scope.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, during resizing doRedraw() is called and it then calls toggle($element); which in turn triggers these two show/hide functions that is in module scope. So isResizing var needs to be in module scope.

@redmunds
Copy link
Copy Markdown
Contributor

Done with initial review.

@redmunds
Copy link
Copy Markdown
Contributor

Looks good. Merging.

redmunds added a commit that referenced this pull request Feb 28, 2014
Save side bar visibility immediately when not in resizing.
@redmunds redmunds merged commit 70d3e5c into master Feb 28, 2014
@redmunds redmunds deleted the rlim/save-sidebar-visibility branch February 28, 2014 19:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[prefs] Sidebar prefs not saved consistently

2 participants