[MM-38532] Use currentView to check for most recently used view (#1776) (#1777)

(cherry picked from commit 3665e87cba)

Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
This commit is contained in:
Mattermost Build 2021-10-01 17:35:31 +02:00 committed by GitHub
parent ee4e438bd7
commit ceec1ec19b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,7 +114,7 @@ export class ViewManager {
server.tabs.forEach((tab) => {
const tabView = getServerView(srv, tab);
const recycle = oldviews.get(tabView.name);
if (recycle && recycle.isVisible) {
if (recycle && recycle.name === this.currentView) {
setFocus = recycle.name;
}
if (!tab.isOpen) {