Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
actually persist right panel width on resize
Browse files Browse the repository at this point in the history
  • Loading branch information
bwindels committed Dec 3, 2018
1 parent 13491e7 commit 541b001
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/structures/MainSplit.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ export default class MainSplit extends React.Component {
constructor(props) {
super(props);
this._setResizeContainerRef = this._setResizeContainerRef.bind(this);
this._onResized = this._onResized.bind(this);
}

_onResized(size) {
window.localStorage.setItem("mx_rhs_size", size);
}

_createResizer() {
Expand All @@ -33,7 +38,9 @@ export default class MainSplit extends React.Component {
};
const resizer = new Resizer(
this.resizeContainer,
FixedDistributor);
FixedDistributor,
{onResized: this._onResized},
);
resizer.setClassNames(classNames);
const rhsSize = window.localStorage.getItem("mx_rhs_size");
if (rhsSize !== null) {
Expand Down

0 comments on commit 541b001

Please sign in to comment.