1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-21 07:42:09 +03:00

Merge pull request #1533 from anoadragon453/develop

Remember whether widget drawer was hidden per-room
This commit is contained in:
Richard Lewis
2017-11-06 14:29:25 +00:00
committed by GitHub
2 changed files with 20 additions and 2 deletions

View File

@ -303,6 +303,15 @@ module.exports = React.createClass({
_shouldShowApps: function(room) {
if (!BROWSER_SUPPORTS_SANDBOX) return false;
// Check if user has previously chosen to hide the app drawer for this
// room. If so, do not show apps
let hideWidgetDrawer = localStorage.getItem(
room.roomId + "_hide_widget_drawer");
if (hideWidgetDrawer === "true") {
return false;
}
const appsStateEvents = room.currentState.getStateEvents('im.vector.modular.widgets');
// any valid widget = show apps
for (let i = 0; i < appsStateEvents.length; i++) {