mirror of
				https://github.com/redphx/better-xcloud.git
				synced 2025-11-04 07:54:05 +01:00 
			
		
		
		
	Clear PatcherCache when changing settings
This commit is contained in:
		@@ -5,6 +5,7 @@ import { getPreferredServerRegion } from "@utils/region";
 | 
			
		||||
import { UserAgent, UserAgentProfile } from "@utils/user-agent";
 | 
			
		||||
import { getPref, Preferences, PrefKey, setPref, toPrefElement } from "@utils/preferences";
 | 
			
		||||
import { t, refreshCurrentLocale } from "@utils/translation";
 | 
			
		||||
import { PatcherCache } from "../patcher";
 | 
			
		||||
 | 
			
		||||
const SETTINGS_UI = {
 | 
			
		||||
    'Better xCloud': {
 | 
			
		||||
@@ -159,6 +160,9 @@ export function setupSettingsUi() {
 | 
			
		||||
 | 
			
		||||
        $reloadBtnWrapper.classList.remove('bx-gone');
 | 
			
		||||
 | 
			
		||||
        // Clear PatcherCache;
 | 
			
		||||
        PatcherCache.clear();
 | 
			
		||||
 | 
			
		||||
        if ((e.target as HTMLElement).id === 'bx_setting_' + PrefKey.BETTER_XCLOUD_LOCALE) {
 | 
			
		||||
            // Update locale
 | 
			
		||||
            refreshCurrentLocale();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user