Keep on sync the current team id with mattermost since the beginning (#3499)

* Keep on sync the current team id with mattermost since the beginning

* Removing unneeded code
This commit is contained in:
Jesús Espino 2022-08-05 17:29:09 +02:00 committed by GitHub
parent 97818c3915
commit 08dd39d054
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -249,6 +249,15 @@ export default class Plugin {
}
})
let fbPrevTeamID = store.getState().teams.currentId
store.subscribe(() => {
const currentTeamID = store.getState().teams.currentId
if (currentTeamID && currentTeamID !== fbPrevTeamID) {
fbPrevTeamID = currentTeamID
selectTeam(currentTeamID)
}
})
if (this.registry.registerProduct) {
windowAny.frontendBaseURL = subpath + '/boards'