mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 13:37:04 +03:00
Auto update hidden categories when redeemed
This commit is contained in:
@@ -38,10 +38,21 @@ class CategorySkipOptionsComponent extends React.Component<CategorySkipOptionsPr
|
||||
this.setState({
|
||||
hideChapter: !allowed
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
render(): React.ReactElement {
|
||||
if (this.state.hideChapter) {
|
||||
// Ensure force update refreshes this
|
||||
fetchingChaptersAllowed().then((allowed) => {
|
||||
if (allowed) {
|
||||
this.setState({
|
||||
hideChapter: !allowed
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
let defaultOption = "disable";
|
||||
// Set the default opton properly
|
||||
for (const categorySelection of Config.config.categorySelections) {
|
||||
|
||||
Reference in New Issue
Block a user