@@ -22,7 +22,7 @@ import {
2222 STREAMLINE_STYLING_KEY ,
2323 DISALLOW_DIAGNOSTICS ,
2424} from "~/data/userSettings" ;
25- import { getSetting , setSetting } from "~/utils/extensionSettings" ;
25+ import { setSetting } from "~/utils/extensionSettings" ;
2626import { enablePostHog , disablePostHog } from "~/utils/posthog" ;
2727import KeyboardShortcutInput from "./KeyboardShortcutInput" ;
2828import streamlineStyling from "~/styles/streamlineStyling" ;
@@ -65,7 +65,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
6565 title = "Overlay"
6666 description = "Whether or not to overlay discourse context information over discourse node references."
6767 settingKeys = { [ "Discourse context overlay" ] }
68- initialValue = { getSetting < boolean > ( "discourse-context-overlay" , false ) }
6968 onChange = { ( checked ) => {
7069 void setSetting ( "discourse-context-overlay" , checked ) ;
7170 onPageRefObserverChange ( overlayHandler ) ( checked ) ;
@@ -76,7 +75,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
7675 title = "Suggestive mode overlay"
7776 description = "Whether or not to overlay suggestive mode button over discourse node references."
7877 settingKeys = { [ "Suggestive mode overlay" ] }
79- initialValue = { getSetting < boolean > ( "suggestive-mode-overlay" , false ) }
8078 onChange = { ( checked ) => {
8179 void setSetting ( "suggestive-mode-overlay" , checked ) ;
8280 onPageRefObserverChange ( getSuggestiveOverlayHandler ( onloadArgs ) ) (
@@ -89,7 +87,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
8987 title = "Text selection popup"
9088 description = "Whether or not to show the discourse node menu when selecting text."
9189 settingKeys = { [ "Text selection popup" ] }
92- initialValue = { getSetting ( "text-selection-popup" , true ) }
9390 onChange = { ( checked ) => {
9491 void setSetting ( "text-selection-popup" , checked ) ;
9592 } }
@@ -98,7 +95,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
9895 title = "Disable sidebar open"
9996 description = "Disable opening new nodes in the sidebar when created"
10097 settingKeys = { [ "Disable sidebar open" ] }
101- initialValue = { getSetting < boolean > ( "disable-sidebar-open" , false ) }
10298 onChange = { ( checked ) => {
10399 void setSetting ( "disable-sidebar-open" , checked ) ;
104100 } }
@@ -107,7 +103,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
107103 title = "Page preview"
108104 description = "Whether or not to display page previews when hovering over page refs"
109105 settingKeys = { [ "Page preview" ] }
110- initialValue = { getSetting < boolean > ( "page-preview" , false ) }
111106 onChange = { ( checked ) => {
112107 void setSetting ( "page-preview" , checked ) ;
113108 onPageRefObserverChange ( previewPageRefHandler ) ( checked ) ;
@@ -117,7 +112,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
117112 title = "Hide feedback button"
118113 description = "Hide the 'Send feedback' button at the bottom right of the screen."
119114 settingKeys = { [ "Hide feedback button" ] }
120- initialValue = { getSetting < boolean > ( "hide-feedback-button" , false ) }
121115 onChange = { ( checked ) => {
122116 void setSetting ( "hide-feedback-button" , checked ) ;
123117 if ( checked ) {
@@ -131,7 +125,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
131125 title = "Auto canvas relations"
132126 description = "Automatically add discourse relations to canvas when a node is added"
133127 settingKeys = { [ "Auto canvas relations" ] }
134- initialValue = { getSetting < boolean > ( AUTO_CANVAS_RELATIONS_KEY , false ) }
135128 onChange = { ( checked ) => {
136129 void setSetting ( AUTO_CANVAS_RELATIONS_KEY , checked ) ;
137130 } }
@@ -141,10 +134,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
141134 title = "(BETA) Overlay in canvas"
142135 description = "Whether or not to overlay discourse context information over canvas nodes."
143136 settingKeys = { [ "Overlay in canvas" ] }
144- initialValue = { getSetting < boolean > (
145- DISCOURSE_CONTEXT_OVERLAY_IN_CANVAS_KEY ,
146- false ,
147- ) }
148137 onChange = { ( checked ) => {
149138 void setSetting ( DISCOURSE_CONTEXT_OVERLAY_IN_CANVAS_KEY , checked ) ;
150139 } }
@@ -153,7 +142,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
153142 title = "Streamline styling"
154143 description = "Apply streamlined styling to your personal graph for a cleaner appearance."
155144 settingKeys = { [ "Streamline styling" ] }
156- initialValue = { getSetting < boolean > ( STREAMLINE_STYLING_KEY , false ) }
157145 onChange = { ( checked ) => {
158146 void setSetting ( STREAMLINE_STYLING_KEY , checked ) ;
159147 const existingStyleElement =
@@ -171,7 +159,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
171159 title = "Disable product diagnostics"
172160 description = "Disable sending usage signals and error reports that help us improve the product."
173161 settingKeys = { [ "Disable product diagnostics" ] }
174- initialValue = { getSetting < boolean > ( DISALLOW_DIAGNOSTICS , false ) }
175162 onChange = { ( checked ) => {
176163 void setSetting ( DISALLOW_DIAGNOSTICS , checked ) ;
177164 if ( checked ) {
0 commit comments