diff options
-rw-r--r-- | src/components/SkipNoticeComponent.tsx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index 4664ff76..b20776b7 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -631,6 +631,7 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta switch (type) { case 0: + this.clearConfigListener(); this.setNoticeInfoMessageWithOnClick(() => window.open(wikiLinkText), chrome.i18n.getMessage("OpenCategoryWikiPage")); this.setState({ voted: utils.replaceArrayElement(this.state.voted, SkipNoticeAction.Downvote, index) @@ -694,11 +695,18 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta } closeListener(): void { - //this.clearConfigListener(); + this.clearConfigListener(); this.props.closeListener(); } + clearConfigListener(): void { + if (this.configListener) { + Config.configListeners.splice(Config.configListeners.indexOf(this.configListener), 1); + this.configListener = null; + } + } + unmutedListener(): void { if (this.props.segments.length === 1 && this.props.segments[0].actionType === ActionType.Mute |