@@ -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" ;
@@ -66,7 +66,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
6666 title = "Overlay"
6767 description = "Whether or not to overlay discourse context information over discourse node references."
6868 settingKeys = { [ "Discourse context overlay" ] }
69- initialValue = { getSetting < boolean > ( "discourse-context-overlay" , false ) }
7069 onChange = { ( checked ) => {
7170 void setSetting ( "discourse-context-overlay" , checked ) ;
7271 onPageRefObserverChange ( overlayHandler ) ( checked ) ;
@@ -80,7 +79,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
8079 title = "Suggestive mode overlay"
8180 description = "Whether or not to overlay suggestive mode button over discourse node references."
8281 settingKeys = { [ "Suggestive mode overlay" ] }
83- initialValue = { getSetting < boolean > ( "suggestive-mode-overlay" , false ) }
8482 onChange = { ( checked ) => {
8583 void setSetting ( "suggestive-mode-overlay" , checked ) ;
8684 onPageRefObserverChange ( getSuggestiveOverlayHandler ( onloadArgs ) ) (
@@ -93,7 +91,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
9391 title = "Text selection popup"
9492 description = "Whether or not to show the discourse node menu when selecting text."
9593 settingKeys = { [ "Text selection popup" ] }
96- initialValue = { getSetting ( "text-selection-popup" , true ) }
9794 onChange = { ( checked ) => {
9895 void setSetting ( "text-selection-popup" , checked ) ;
9996 } }
@@ -102,7 +99,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
10299 title = "Disable sidebar open"
103100 description = "Disable opening new nodes in the sidebar when created"
104101 settingKeys = { [ "Disable sidebar open" ] }
105- initialValue = { getSetting < boolean > ( "disable-sidebar-open" , false ) }
106102 onChange = { ( checked ) => {
107103 void setSetting ( "disable-sidebar-open" , checked ) ;
108104 } }
@@ -111,7 +107,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
111107 title = "Page preview"
112108 description = "Whether or not to display page previews when hovering over page refs"
113109 settingKeys = { [ "Page preview" ] }
114- initialValue = { getSetting < boolean > ( "page-preview" , false ) }
115110 onChange = { ( checked ) => {
116111 void setSetting ( "page-preview" , checked ) ;
117112 onPageRefObserverChange ( previewPageRefHandler ) ( checked ) ;
@@ -121,7 +116,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
121116 title = "Hide feedback button"
122117 description = "Hide the 'Send feedback' button at the bottom right of the screen."
123118 settingKeys = { [ "Hide feedback button" ] }
124- initialValue = { getSetting < boolean > ( "hide-feedback-button" , false ) }
125119 onChange = { ( checked ) => {
126120 void setSetting ( "hide-feedback-button" , checked ) ;
127121 if ( checked ) {
@@ -135,7 +129,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
135129 title = "Auto canvas relations"
136130 description = "Automatically add discourse relations to canvas when a node is added"
137131 settingKeys = { [ "Auto canvas relations" ] }
138- initialValue = { getSetting < boolean > ( AUTO_CANVAS_RELATIONS_KEY , false ) }
139132 onChange = { ( checked ) => {
140133 void setSetting ( AUTO_CANVAS_RELATIONS_KEY , checked ) ;
141134 } }
@@ -145,10 +138,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
145138 title = "(BETA) Overlay in canvas"
146139 description = "Whether or not to overlay discourse context information over canvas nodes."
147140 settingKeys = { [ "Overlay in canvas" ] }
148- initialValue = { getSetting < boolean > (
149- DISCOURSE_CONTEXT_OVERLAY_IN_CANVAS_KEY ,
150- false ,
151- ) }
152141 onChange = { ( checked ) => {
153142 void setSetting ( DISCOURSE_CONTEXT_OVERLAY_IN_CANVAS_KEY , checked ) ;
154143 } }
@@ -157,7 +146,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
157146 title = "Streamline styling"
158147 description = "Apply streamlined styling to your personal graph for a cleaner appearance."
159148 settingKeys = { [ "Streamline styling" ] }
160- initialValue = { getSetting < boolean > ( STREAMLINE_STYLING_KEY , false ) }
161149 onChange = { ( checked ) => {
162150 void setSetting ( STREAMLINE_STYLING_KEY , checked ) ;
163151 const existingStyleElement =
@@ -175,7 +163,6 @@ const HomePersonalSettings = ({ onloadArgs }: { onloadArgs: OnloadArgs }) => {
175163 title = "Disable product diagnostics"
176164 description = "Disable sending usage signals and error reports that help us improve the product."
177165 settingKeys = { [ "Disable product diagnostics" ] }
178- initialValue = { getSetting < boolean > ( DISALLOW_DIAGNOSTICS , false ) }
179166 onChange = { ( checked ) => {
180167 void setSetting ( DISALLOW_DIAGNOSTICS , checked ) ;
181168 if ( checked ) {
0 commit comments