mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
move localstorage crap entirely to TextualBody
This commit is contained in:
parent
cdc89c0623
commit
efd01d6929
@ -78,10 +78,6 @@ module.exports = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onUnhidePreviewClick: function() {
|
onUnhidePreviewClick: function() {
|
||||||
if (global.localStorage) {
|
|
||||||
// FIXME: factor this out with LinkPreviewWidget
|
|
||||||
global.localStorage.removeItem("hide_preview_" + this.props.mxEvent.getId());
|
|
||||||
}
|
|
||||||
if (this.props.eventTileOps) {
|
if (this.props.eventTileOps) {
|
||||||
this.props.eventTileOps.unhideWidget();
|
this.props.eventTileOps.unhideWidget();
|
||||||
}
|
}
|
||||||
@ -127,10 +123,8 @@ module.exports = React.createClass({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (this.props.eventTileOps) {
|
||||||
if (global.localStorage) {
|
if (this.props.eventTileOps.isWidgetHidden()) {
|
||||||
// FIXME: factor this out with LinkPreviewWidget
|
|
||||||
if (global.localStorage.getItem("hide_preview_" + this.props.mxEvent.getId()) === "1") {
|
|
||||||
unhidePreviewButton = (
|
unhidePreviewButton = (
|
||||||
<div className="mx_ContextualMenu_field" onClick={this.onUnhidePreviewClick}>
|
<div className="mx_ContextualMenu_field" onClick={this.onUnhidePreviewClick}>
|
||||||
Unhide Preview
|
Unhide Preview
|
||||||
|
Loading…
Reference in New Issue
Block a user