Skip to content

Commit

Permalink
Keep on sync the current team id with mattermost since the beginning (m…
Browse files Browse the repository at this point in the history
…attermost-community#3499)

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

* Removing unneeded code
  • Loading branch information
jespino authored Aug 5, 2022
1 parent 97818c3 commit 08dd39d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mattermost-plugin/webapp/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit 08dd39d

Please sign in to comment.