-
-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: never show read setting (#1816)
- Loading branch information
Showing
5 changed files
with
49 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/features/settings/general/hiding/NeverShowReadPosts.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { IonItem, IonToggle } from "@ionic/react"; | ||
|
||
import { useAppDispatch, useAppSelector } from "#/store"; | ||
|
||
import { setNeverShowReadPosts } from "../../settingsSlice"; | ||
|
||
export default function NeverShowReadPosts() { | ||
const dispatch = useAppDispatch(); | ||
const neverShowReadPosts = useAppSelector( | ||
(state) => state.settings.general.posts.neverShowReadPosts, | ||
); | ||
|
||
return ( | ||
<IonItem> | ||
<IonToggle | ||
checked={neverShowReadPosts} | ||
onIonChange={(e) => dispatch(setNeverShowReadPosts(e.detail.checked))} | ||
> | ||
Never Show Previously Read | ||
</IonToggle> | ||
</IonItem> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters