revert changes made to the ephemeral store

This commit is contained in:
Avinash Lingaloo
2022-05-02 12:12:43 +04:00
parent aabe8bd17e
commit f093cd3409

View File

@@ -1,8 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {dismissOverlay} from '@screens/navigation';
class EphemeralStore {
allNavigationComponentIds: string[] = [];
navigationComponentIdStack: string[] = [];
@@ -11,7 +9,6 @@ class EphemeralStore {
visibleTab = 'Home';
creatingChannel = false;
creatingDMorGMTeammates: string[] = [];
overlays: string[] = [];
addNavigationComponentId = (componentId: string) => {
this.addToNavigationComponentIdStack(componentId);
@@ -37,10 +34,6 @@ class EphemeralStore {
this.navigationModalStack.unshift(componentId);
};
addNavigationOverlay = (componentId: string) => {
this.overlays.unshift(componentId);
};
clearNavigationComponents = () => {
this.navigationComponentIdStack = [];
this.navigationModalStack = [];
@@ -51,10 +44,6 @@ class EphemeralStore {
this.navigationModalStack = [];
};
clearNavigationOverlays = () => {
this.overlays = [];
};
getAllNavigationComponents = () => this.allNavigationComponentIds;
getNavigationTopComponentId = () => {
@@ -88,17 +77,6 @@ class EphemeralStore {
}
};
removeNavigationOverlays = () => {
const hasOverlays = this.overlays.length;
if (hasOverlays) {
this.overlays.forEach((o) => {
dismissOverlay(o);
});
this.clearNavigationOverlays();
}
};
setVisibleTap = (tab: string) => {
this.visibleTab = tab;
};