mirror of https://github.com/vector-im/riot-web
Merge pull request #2541 from matrix-org/bwindels/allowlhsexpandwithnarrowviewport
Allow expanding the left panel manually when in narrow modepull/21833/head
commit
73b16dd526
|
@ -164,9 +164,11 @@ const LoggedInView = React.createClass({
|
||||||
const collapseConfig = {
|
const collapseConfig = {
|
||||||
toggleSize: 260 - 50,
|
toggleSize: 260 - 50,
|
||||||
onCollapsed: (collapsed) => {
|
onCollapsed: (collapsed) => {
|
||||||
this.setState({collapseLhs: collapsed});
|
|
||||||
if (collapsed) {
|
if (collapsed) {
|
||||||
|
dis.dispatch({action: "hide_left_panel"}, true);
|
||||||
window.localStorage.setItem("mx_lhs_size", '0');
|
window.localStorage.setItem("mx_lhs_size", '0');
|
||||||
|
} else {
|
||||||
|
dis.dispatch({action: "show_left_panel"}, true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onResized: (size) => {
|
onResized: (size) => {
|
||||||
|
@ -540,7 +542,7 @@ const LoggedInView = React.createClass({
|
||||||
<div ref={this._setResizeContainerRef} className={bodyClasses}>
|
<div ref={this._setResizeContainerRef} className={bodyClasses}>
|
||||||
<LeftPanel
|
<LeftPanel
|
||||||
toolbarShown={!!topBar}
|
toolbarShown={!!topBar}
|
||||||
collapsed={this.props.collapseLhs || this.state.collapseLhs || false}
|
collapsed={this.props.collapseLhs || false}
|
||||||
disabled={this.props.leftDisabled}
|
disabled={this.props.leftDisabled}
|
||||||
/>
|
/>
|
||||||
<ResizeHandle />
|
<ResizeHandle />
|
||||||
|
|
|
@ -161,7 +161,7 @@ export default React.createClass({
|
||||||
|
|
||||||
// If we're trying to just view a user ID (i.e. /user URL), this is it
|
// If we're trying to just view a user ID (i.e. /user URL), this is it
|
||||||
viewUserId: null,
|
viewUserId: null,
|
||||||
|
// this is persisted as mx_lhs_size, loaded in LoggedInView
|
||||||
collapseLhs: false,
|
collapseLhs: false,
|
||||||
collapsedRhs: window.localStorage.getItem("mx_rhs_collapsed") === "true",
|
collapsedRhs: window.localStorage.getItem("mx_rhs_collapsed") === "true",
|
||||||
leftDisabled: false,
|
leftDisabled: false,
|
||||||
|
|
Loading…
Reference in New Issue