docs: handle language preference change cleanup comment

Add comment explaining why cleanup is not needed for language preference subscription
This commit is contained in:
icarus 2025-10-23 23:35:21 +08:00
parent 9b1ccb60aa
commit b18c00e38b

View File

@ -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)