mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 18:50:56 +08:00
docs: handle language preference change cleanup comment
Add comment explaining why cleanup is not needed for language preference subscription
This commit is contained in:
parent
9b1ccb60aa
commit
b18c00e38b
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user