Minimize widgets by default
Fixes https://github.com/vector-im/riot-web/issues/12921
This commit is contained in:
parent
ef8c5033ee
commit
34be024b21
2 changed files with 7 additions and 10 deletions
|
@ -81,12 +81,14 @@ export default createReactClass({
|
|||
const hideWidgetKey = this.props.room.roomId + '_hide_widget_drawer';
|
||||
switch (action.action) {
|
||||
case 'appsDrawer':
|
||||
// Note: these booleans are awkward because localstorage is fundamentally
|
||||
// string-based. We also do exact equality on the strings later on.
|
||||
if (action.show) {
|
||||
localStorage.removeItem(hideWidgetKey);
|
||||
localStorage.setItem(hideWidgetKey, "false");
|
||||
} else {
|
||||
// Store hidden state of widget
|
||||
// Don't show if previously hidden
|
||||
localStorage.setItem(hideWidgetKey, true);
|
||||
localStorage.setItem(hideWidgetKey, "true");
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue