MCPcopy
hub / github.com/darkreader/darkreader / toggleNews

Function toggleNews

src/ui/popup/components/body.tsx:100–105  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98 });
99
100 function toggleNews() {
101 if (state.newsOpen && unreadNews.length > 0) {
102 props.actions.markNewsAsRead(unreadNews.map(({id}) => id));
103 }
104 setState({newsOpen: !state.newsOpen, mobileLinksOpen: false, didNewsSlideIn: state.didNewsSlideIn || !state.newsOpen});
105 }
106
107 function toggleMobileLinks() {
108 setState({mobileLinksOpen: !state.mobileLinksOpen, newsOpen: false, didMobileLinksSlideIn: state.didMobileLinksSlideIn || !state.mobileLinksOpen});

Callers

nothing calls this directly

Calls 1

markNewsAsReadMethod · 0.65

Tested by

no test coverage detected