[MM-51964] Clean up MattermostView, remove tuple in preparation for id (#2668)

undefined
This commit is contained in:
Devin Binnie
2023-04-06 11:17:33 -04:00
committed by GitHub
parent 53fb8c8fd3
commit 88eb2e2c70
14 changed files with 470 additions and 541 deletions

View File

@@ -2,11 +2,10 @@
// See LICENSE.txt for license information.
import {v4 as uuid} from 'uuid';
import {Tuple as tuple} from '@bloomberg/record-tuple-polyfill';
import {MattermostServer} from 'common/servers/MattermostServer';
import {getTabViewName, TabType, TabView, TabTuple} from './TabView';
import {getTabViewName, TabType, TabView} from './TabView';
export default abstract class BaseTabView implements TabView {
id: string;
@@ -21,9 +20,6 @@ export default abstract class BaseTabView implements TabView {
get name(): string {
return getTabViewName(this.server.name, this.type);
}
get urlTypeTuple(): TabTuple {
return tuple(this.server.url.href, this.type) as TabTuple;
}
get url(): URL {
throw new Error('Not implemented');
}

View File

@@ -9,7 +9,6 @@ export const TAB_MESSAGING = 'TAB_MESSAGING';
export const TAB_FOCALBOARD = 'TAB_FOCALBOARD';
export const TAB_PLAYBOOKS = 'TAB_PLAYBOOKS';
export type TabType = typeof TAB_MESSAGING | typeof TAB_FOCALBOARD | typeof TAB_PLAYBOOKS;
export type TabTuple = [string, TabType];
export interface TabView {
id: string;
@@ -20,7 +19,6 @@ export interface TabView {
get type(): TabType;
get url(): URL;
get shouldNotify(): boolean;
get urlTypeTuple(): TabTuple;
}
export function getDefaultTeamWithTabsFromTeam(team: FullTeam) {