diff --git a/src/views/home/index.tsx b/src/views/home/index.tsx index 1a285a499..ecd895a91 100644 --- a/src/views/home/index.tsx +++ b/src/views/home/index.tsx @@ -14,9 +14,11 @@ import RelaySelectionProvider, { useRelaySelectionContext } from "../../provider import { NostrRequestFilter } from "../../types/nostr-query"; import useClientSideMuteFilter from "../../hooks/use-client-side-mute-filter"; +var showRepliesStored = localStorage.getItem("show-replies") === "true"; + function HomePage() { const timelinePageEventFilter = useTimelinePageEventFilter(); - const showReplies = useDisclosure(); + const showReplies = useDisclosure({ defaultIsOpen: showRepliesStored }); const muteFilter = useClientSideMuteFilter(); const eventFilter = useCallback( (event: NostrEvent) => { @@ -44,7 +46,14 @@ function HomePage() { const header = ( - + { + localStorage.setItem("show-replies", v.target.checked ? "true" : "false"); + showRepliesStored = v.target.checked; + showReplies.onToggle(); + }} + > Show Replies