mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 12:37:05 +03:00
Update submission UI whenever there is a config update.
This commit is contained in:
@@ -47,6 +47,9 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
document.getElementById("sponsorTimesContainer" + this.idSuffix).addEventListener('keydown', function (event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
// Add as a config listener
|
||||
Config.configListeners.push(this.configUpdate.bind(this));
|
||||
}
|
||||
|
||||
render() {
|
||||
@@ -319,6 +322,10 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
this.props.submissionNotice.forceUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
configUpdate() {
|
||||
this.forceUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
export default SponsorTimeEditComponent;
|
||||
Reference in New Issue
Block a user