Merge pull request #2369 from matrix-org/bwindels/rhsdefaultsize

Redesign: give right panel default width
pull/21833/head
Bruno Windels 2018-12-18 16:20:51 +00:00 committed by GitHub
commit 8df139bfab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -41,10 +41,13 @@ export default class MainSplit extends React.Component {
{onResized: this._onResized},
);
resizer.setClassNames(classNames);
const rhsSize = window.localStorage.getItem("mx_rhs_size");
let rhsSize = window.localStorage.getItem("mx_rhs_size");
if (rhsSize !== null) {
resizer.forHandleAt(0).resize(parseInt(rhsSize, 10));
rhsSize = parseInt(rhsSize, 10);
} else {
rhsSize = 350;
}
resizer.forHandleAt(0).resize(rhsSize);
resizer.attach();
this.resizer = resizer;