Auto update hidden categories when redeemed

This commit is contained in:
Ajay
2022-09-02 14:38:49 -04:00
parent 39ed7ea83c
commit c8e2bb0c13
4 changed files with 49 additions and 12 deletions

View File

@@ -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) {