From 70e55cf37b561e68d217796699d368e858dd34ca Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Sat, 14 Dec 2024 14:23:00 +0100 Subject: [PATCH] Fix NewsPopup close button when showInSidebar=true --- plugins/NewsPopup.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/NewsPopup.jsx b/plugins/NewsPopup.jsx index f8fb73a68..aacff48bd 100644 --- a/plugins/NewsPopup.jsx +++ b/plugins/NewsPopup.jsx @@ -93,7 +93,11 @@ class NewsPopup extends React.Component { d.setTime(d.getTime() + (days * 24 * 60 * 60 * 1000)); document.cookie = "newsrev=" + this.props.newsRev + "; SameSite=Lax; expires=" + d.toUTCString(); } - this.setState({showPopup: false}); + if (this.props.showInSidebar) { + this.props.setCurrentTask(null); + } else { + this.setState({showPopup: false}); + } }; }