From b18c00e38b4273074b73eb040eaa942dc2be1464 Mon Sep 17 00:00:00 2001 From: icarus Date: Thu, 23 Oct 2025 23:35:21 +0800 Subject: [PATCH] docs: handle language preference change cleanup comment Add comment explaining why cleanup is not needed for language preference subscription --- src/main/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/index.ts b/src/main/index.ts index 14bbe0f4c2..ed257f9f08 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -173,6 +173,7 @@ if (!app.requestSingleInstanceLock()) { const userLanguage = preferenceService.get('app.language') if (userLanguage) { i18n.changeLanguage(userLanguage) + // Do not care about cleanup because it spans the whole lifecyle of the app preferenceService.subscribeChange('app.language', (newLang) => { if (newLang) { i18n.changeLanguage(newLang)