From efd01d69290fbf398401b579703549b25ad3208f Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Mon, 11 Apr 2016 23:54:00 +0100 Subject: [PATCH] move localstorage crap entirely to TextualBody --- src/components/views/rooms/MessageContextMenu.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/components/views/rooms/MessageContextMenu.js b/src/components/views/rooms/MessageContextMenu.js index 1e220fcc..4eea4603 100644 --- a/src/components/views/rooms/MessageContextMenu.js +++ b/src/components/views/rooms/MessageContextMenu.js @@ -78,10 +78,6 @@ module.exports = React.createClass({ }, onUnhidePreviewClick: function() { - if (global.localStorage) { - // FIXME: factor this out with LinkPreviewWidget - global.localStorage.removeItem("hide_preview_" + this.props.mxEvent.getId()); - } if (this.props.eventTileOps) { this.props.eventTileOps.unhideWidget(); } @@ -127,10 +123,8 @@ module.exports = React.createClass({ ); - - if (global.localStorage) { - // FIXME: factor this out with LinkPreviewWidget - if (global.localStorage.getItem("hide_preview_" + this.props.mxEvent.getId()) === "1") { + if (this.props.eventTileOps) { + if (this.props.eventTileOps.isWidgetHidden()) { unhidePreviewButton = (
Unhide Preview