From fd5ad568866e9ee30d3ecfb222d9bbd5791f631c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 18 Dec 2018 17:12:32 +0100 Subject: [PATCH] give right panel default width of 350px --- src/components/structures/MainSplit.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/structures/MainSplit.js b/src/components/structures/MainSplit.js index 5c69ef6745..0427130eea 100644 --- a/src/components/structures/MainSplit.js +++ b/src/components/structures/MainSplit.js @@ -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;