Skip to content

Commit

Permalink
Fix Issue With Checkbox not Updating on AniDB Settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
ElementalCrisis committed Oct 29, 2023
1 parent bc96d23 commit ffb37b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/pages/settings/SettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ export const initialSettings = {
type ContextType = {
newSettings: SettingsType;
setNewSettings: (settings: SettingsType) => void;
updateSetting: (type: string, key: string, value: string) => void;
updateSetting: (type: string, key: string, value: string | boolean) => void;
};

function SettingsPage() {
Expand Down
18 changes: 9 additions & 9 deletions src/pages/settings/tabs/AniDBSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,28 +179,28 @@ function AniDBSettings() {
label="Character Images"
id="character-images"
isChecked={DownloadCharacters}
onChange={event => updateSetting('AniDb', 'DownloadCharacters', event.target.checked.toString())}
onChange={event => updateSetting('AniDb', 'DownloadCharacters', event.target.checked)}
/>
<Checkbox
justify
label="Creator Images"
id="creator-images"
isChecked={DownloadCreators}
onChange={event => updateSetting('AniDb', 'DownloadCreators', event.target.checked.toString())}
onChange={event => updateSetting('AniDb', 'DownloadCreators', event.target.checked)}
/>
<Checkbox
justify
label="Release Groups"
id="release-groups"
isChecked={DownloadReleaseGroups}
onChange={event => updateSetting('AniDb', 'DownloadReleaseGroups', event.target.checked.toString())}
onChange={event => updateSetting('AniDb', 'DownloadReleaseGroups', event.target.checked)}
/>
<Checkbox
justify
label="Related Anime"
id="related-anime"
isChecked={DownloadRelatedAnime}
onChange={event => updateSetting('AniDb', 'DownloadRelatedAnime', event.target.checked.toString())}
onChange={event => updateSetting('AniDb', 'DownloadRelatedAnime', event.target.checked)}
/>
<div
className={cx(
Expand Down Expand Up @@ -228,35 +228,35 @@ function AniDBSettings() {
label="Add Files"
id="add-files"
isChecked={MyList_AddFiles}
onChange={event => updateSetting('AniDb', 'MyList_AddFiles', event.target.checked.toString())}
onChange={event => updateSetting('AniDb', 'MyList_AddFiles', event.target.checked)}
/>
<Checkbox
justify
label="Read Watched"
id="read-watched"
isChecked={MyList_ReadWatched}
onChange={event => updateSetting('AniDb', 'MyList_ReadWatched', event.target.checked.toString())}
onChange={event => updateSetting('AniDb', 'MyList_ReadWatched', event.target.checked)}
/>
<Checkbox
justify
label="Read Unwatched"
id="read-unwatched"
isChecked={MyList_ReadUnwatched}
onChange={event => updateSetting('AniDb', 'MyList_ReadUnwatched', event.target.checked.toString())}
onChange={event => updateSetting('AniDb', 'MyList_ReadUnwatched', event.target.checked)}
/>
<Checkbox
justify
label="Set Watched"
id="set-watched"
isChecked={MyList_SetWatched}
onChange={event => updateSetting('AniDb', 'MyList_SetWatched', event.target.checked.toString())}
onChange={event => updateSetting('AniDb', 'MyList_SetWatched', event.target.checked)}
/>
<Checkbox
justify
label="Set Unwatched"
id="set-unwatched"
isChecked={MyList_SetUnwatched}
onChange={event => updateSetting('AniDb', 'MyList_SetUnwatched', event.target.checked.toString())}
onChange={event => updateSetting('AniDb', 'MyList_SetUnwatched', event.target.checked)}
/>
<div className="flex items-center justify-between">
<span>Storage State</span>
Expand Down

0 comments on commit ffb37b5

Please sign in to comment.