@@ -38,11 +38,7 @@ interface SettingsContextType {
3838 updateLanguage : ( language : SupportedLanguage ) => void ;
3939 togglePrivacyMode : ( ) => void ;
4040 toggleExperimentalMode : ( ) => void ;
41- updateSettings : ( newSettings : Partial < Settings > ) => void ;
4241 toggleAutoCheckUpdates : ( ) => void ;
43- toggleUpdateNotifications : ( ) => void ;
44- toggleSilentDownload : ( ) => void ;
45- handleManualCheck : ( ) => void ;
4642}
4743
4844// 创建上下文
@@ -174,41 +170,6 @@ export const SettingsProvider: React.FC<{ children: React.ReactNode }> = ({
174170 saveSettings ( newSettings ) ;
175171 } ;
176172
177- // 切换更新通知
178- const toggleUpdateNotifications = ( ) => {
179- const newSettings = {
180- ...settings ,
181- updateNotifications : ! settings . updateNotifications ,
182- } ;
183-
184- setSettings ( newSettings ) ;
185- saveSettings ( newSettings ) ;
186- } ;
187-
188- // 切换静默下载
189- const toggleSilentDownload = ( ) => {
190- const newSettings = {
191- ...settings ,
192- silentDownload : ! settings . silentDownload ,
193- } ;
194-
195- setSettings ( newSettings ) ;
196- saveSettings ( newSettings ) ;
197- } ;
198-
199- // 手动检查更新
200- const handleManualCheck = ( ) => {
201- console . log ( "手动检查更新..." ) ;
202- } ;
203-
204- // 更新多个设置
205- const updateSettings = ( newSettings : Partial < Settings > ) => {
206- const updatedSettings = { ...settings , ...newSettings } ;
207-
208- setSettings ( updatedSettings ) ;
209- saveSettings ( updatedSettings ) ;
210- } ;
211-
212173 // 等待设置加载完成
213174 if ( ! isLoaded ) {
214175 return null ;
@@ -220,11 +181,7 @@ export const SettingsProvider: React.FC<{ children: React.ReactNode }> = ({
220181 updateLanguage,
221182 togglePrivacyMode,
222183 toggleExperimentalMode,
223- updateSettings,
224184 toggleAutoCheckUpdates,
225- toggleUpdateNotifications,
226- toggleSilentDownload,
227- handleManualCheck,
228185 } ;
229186
230187 return (
0 commit comments