浏览代码

refac: code style

Danny Liu 1 年之前
父节点
当前提交
cf44209730
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      src/lib/components/chat/Settings/General.svelte

+ 1 - 5
src/lib/components/chat/Settings/General.svelte

@@ -91,11 +91,7 @@
 	});
 
 	const applyTheme = (_theme: string) => {
-		let themeToApply = _theme;
-
-		if (themeToApply.includes('oled')) {
-			themeToApply = 'dark';
-		}
+		let themeToApply = _theme === 'oled-dark' ? 'dark' : _theme;
 
 		if (_theme === 'system') {
 			themeToApply = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';