* only refresh view when the server URL changes (MM-34565) Create views of current and incoming tabs indexed by unique [URL, TABTYPE] tuples, and diffing them. Tuples that are identical are recycled, merely porting the new server name over. * lint fixes * WIP * linting * remove dependency on by, duad * provide a more exaplanatory name for TabView.prototype.tuple (urlTypeTuple) * minor improvements in viewManager - remove stateful behaviour from makeView - more descriptive variable names when looping - create new arrays before sorting (sort is in-place by default) * resolve linting errors
This commit is contained in:
@@ -22,7 +22,7 @@ import {
|
||||
LOADSCREEN_END,
|
||||
} from 'common/communication';
|
||||
|
||||
import {TabView} from 'common/tabs/TabView';
|
||||
import {TabView, TabTuple} from 'common/tabs/TabView';
|
||||
|
||||
import {ServerInfo} from 'main/server/serverInfo';
|
||||
import ContextMenu from '../contextMenu';
|
||||
@@ -136,6 +136,10 @@ export class MattermostView extends EventEmitter {
|
||||
return this.tab.name;
|
||||
}
|
||||
|
||||
get urlTypeTuple(): TabTuple {
|
||||
return this.tab.urlTypeTuple;
|
||||
}
|
||||
|
||||
resetLoadingStatus = () => {
|
||||
if (this.status !== Status.LOADING) { // if it's already loading, don't touch anything
|
||||
delete this.retryLoad;
|
||||
|
Reference in New Issue
Block a user