From 992c4771f4d78ee349e05a2e1d05ca9d88b19b1c Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Mon, 5 Feb 2018 11:49:44 +0000 Subject: [PATCH] Add button to remove all stickerpacks --- src/components/views/rooms/Stickerpack.js | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/components/views/rooms/Stickerpack.js b/src/components/views/rooms/Stickerpack.js index cb2a19eae7..77e188198a 100644 --- a/src/components/views/rooms/Stickerpack.js +++ b/src/components/views/rooms/Stickerpack.js @@ -33,12 +33,13 @@ export default class Stickerpack extends React.Component { this.onHideStickersClick = this.onHideStickersClick.bind(this); this.onFinished = this.onFinished.bind(this); this._launchManageIntegrations = this._launchManageIntegrations.bind(this); + this._removeStickerpackWidgets = this._removeStickerpackWidgets.bind(this); this.defaultStickersContent = (
-

You don't currently have any stickerpacks enabled

-

Click here to add some!

- Add a stickerpack +

{_t("You don't currently have any stickerpacks enabled")}

+

{_t("Click")} { _t("here") } {_t("to add some!")}

+ {_t('Add
); this.popoverWidth = 300; @@ -50,6 +51,11 @@ export default class Stickerpack extends React.Component { }; } + _removeStickerpackWidgets() { + console.warn('Removing stickerpack widgets'); + Widgets.removeStickerpackWidgets() + } + componentDidMount() { this.scalarClient = null; if (SdkConfig.get().integrations_ui_url && SdkConfig.get().integrations_rest_url) { @@ -91,6 +97,14 @@ export default class Stickerpack extends React.Component { width: this.popoverWidth, }} > +
X
Click here to add your first sitckerpack

; + stickersContent = this.defaultStickersContent; } this.setState({stickersContent}); }