1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-24 13:43:12 +02:00

Fix themes on differen teams (#4172)

This commit is contained in:
Jesús Espino 2022-11-08 19:52:35 +01:00 committed by GitHub
parent 8949c6b13f
commit 7441d01593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -262,6 +262,14 @@ export default class Plugin {
octoClient.teamId = currentTeamID
store.dispatch(initialLoad())
}
if (currentTeamID && currentTeamID !== prevTeamID) {
let theme = mmStore.getState().entities.preferences.myPreferences[`theme--${currentTeamID}`]
if (!theme) {
theme = mmStore.getState().entities.preferences.myPreferences['theme--'] || mmStore.getState().entities.preferences.myPreferences.theme
}
setMattermostTheme(theme)
}
})
let fbPrevTeamID = store.getState().teams.currentId