@@ -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" ;
@@ -67,7 +67,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
6767 title = "Overlay"
6868 description = "Whether or not to overlay discourse context information over discourse node references."
6969 settingKeys = { [ "Discourse context overlay" ] }
70- initialValue = { getSetting < boolean > ( "discourse-context-overlay" , false ) }
7170 onChange = { ( checked ) => {
7271 void setSetting ( "discourse-context-overlay" , checked ) ;
7372 onPageRefObserverChange ( overlayHandler ) ( checked ) ;
@@ -81,7 +80,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
8180 title = "Suggestive mode overlay"
8281 description = "Whether or not to overlay suggestive mode button over discourse node references."
8382 settingKeys = { [ "Suggestive mode overlay" ] }
84- initialValue = { getSetting < boolean > ( "suggestive-mode-overlay" , false ) }
8583 onChange = { ( checked ) => {
8684 void setSetting ( "suggestive-mode-overlay" , checked ) ;
8785 onPageRefObserverChange ( getSuggestiveOverlayHandler ( onloadArgs ) ) (
@@ -94,7 +92,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
9492 title = "Text selection popup"
9593 description = "Whether or not to show the discourse node menu when selecting text."
9694 settingKeys = { [ "Text selection popup" ] }
97- initialValue = { getSetting ( "text-selection-popup" , true ) }
9895 onChange = { ( checked ) => {
9996 void setSetting ( "text-selection-popup" , checked ) ;
10097 } }
@@ -103,7 +100,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
103100 title = "Disable sidebar open"
104101 description = "Disable opening new nodes in the sidebar when created"
105102 settingKeys = { [ "Disable sidebar open" ] }
106- initialValue = { getSetting < boolean > ( "disable-sidebar-open" , false ) }
107103 onChange = { ( checked ) => {
108104 void setSetting ( "disable-sidebar-open" , checked ) ;
109105 } }
@@ -112,7 +108,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
112108 title = "Page preview"
113109 description = "Whether or not to display page previews when hovering over page refs"
114110 settingKeys = { [ "Page preview" ] }
115- initialValue = { getSetting < boolean > ( "page-preview" , false ) }
116111 onChange = { ( checked ) => {
117112 void setSetting ( "page-preview" , checked ) ;
118113 onPageRefObserverChange ( previewPageRefHandler ) ( checked ) ;
@@ -122,7 +117,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
122117 title = "Hide feedback button"
123118 description = "Hide the 'Send feedback' button at the bottom right of the screen."
124119 settingKeys = { [ "Hide feedback button" ] }
125- initialValue = { getSetting < boolean > ( "hide-feedback-button" , false ) }
126120 onChange = { ( checked ) => {
127121 void setSetting ( "hide-feedback-button" , checked ) ;
128122 if ( checked ) {
@@ -136,7 +130,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
136130 title = "Auto canvas relations"
137131 description = "Automatically add discourse relations to canvas when a node is added"
138132 settingKeys = { [ "Auto canvas relations" ] }
139- initialValue = { getSetting < boolean > ( AUTO_CANVAS_RELATIONS_KEY , false ) }
140133 onChange = { ( checked ) => {
141134 void setSetting ( AUTO_CANVAS_RELATIONS_KEY , checked ) ;
142135 } }
@@ -146,10 +139,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
146139 title = "(BETA) Overlay in canvas"
147140 description = "Whether or not to overlay discourse context information over canvas nodes."
148141 settingKeys = { [ "Overlay in canvas" ] }
149- initialValue = { getSetting < boolean > (
150- DISCOURSE_CONTEXT_OVERLAY_IN_CANVAS_KEY ,
151- false ,
152- ) }
153142 onChange = { ( checked ) => {
154143 void setSetting ( DISCOURSE_CONTEXT_OVERLAY_IN_CANVAS_KEY , checked ) ;
155144 } }
@@ -158,7 +147,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
158147 title = "Streamline styling"
159148 description = "Apply streamlined styling to your personal graph for a cleaner appearance."
160149 settingKeys = { [ "Streamline styling" ] }
161- initialValue = { getSetting < boolean > ( STREAMLINE_STYLING_KEY , false ) }
162150 onChange = { ( checked ) => {
163151 void setSetting ( STREAMLINE_STYLING_KEY , checked ) ;
164152 const existingStyleElement =
@@ -176,7 +164,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
176164 title = "Disable product diagnostics"
177165 description = "Disable sending usage signals and error reports that help us improve the product."
178166 settingKeys = { [ "Disable product diagnostics" ] }
179- initialValue = { getSetting < boolean > ( DISALLOW_DIAGNOSTICS , false ) }
180167 onChange = { ( checked ) => {
181168 void setSetting ( DISALLOW_DIAGNOSTICS , checked ) ;
182169 if ( checked ) {
0 commit comments