forked from Ivasoft/mattermost-mobile
revert changes made to the ephemeral store
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
import {dismissOverlay} from '@screens/navigation';
|
|
||||||
|
|
||||||
class EphemeralStore {
|
class EphemeralStore {
|
||||||
allNavigationComponentIds: string[] = [];
|
allNavigationComponentIds: string[] = [];
|
||||||
navigationComponentIdStack: string[] = [];
|
navigationComponentIdStack: string[] = [];
|
||||||
@@ -11,7 +9,6 @@ class EphemeralStore {
|
|||||||
visibleTab = 'Home';
|
visibleTab = 'Home';
|
||||||
creatingChannel = false;
|
creatingChannel = false;
|
||||||
creatingDMorGMTeammates: string[] = [];
|
creatingDMorGMTeammates: string[] = [];
|
||||||
overlays: string[] = [];
|
|
||||||
|
|
||||||
addNavigationComponentId = (componentId: string) => {
|
addNavigationComponentId = (componentId: string) => {
|
||||||
this.addToNavigationComponentIdStack(componentId);
|
this.addToNavigationComponentIdStack(componentId);
|
||||||
@@ -37,10 +34,6 @@ class EphemeralStore {
|
|||||||
this.navigationModalStack.unshift(componentId);
|
this.navigationModalStack.unshift(componentId);
|
||||||
};
|
};
|
||||||
|
|
||||||
addNavigationOverlay = (componentId: string) => {
|
|
||||||
this.overlays.unshift(componentId);
|
|
||||||
};
|
|
||||||
|
|
||||||
clearNavigationComponents = () => {
|
clearNavigationComponents = () => {
|
||||||
this.navigationComponentIdStack = [];
|
this.navigationComponentIdStack = [];
|
||||||
this.navigationModalStack = [];
|
this.navigationModalStack = [];
|
||||||
@@ -51,10 +44,6 @@ class EphemeralStore {
|
|||||||
this.navigationModalStack = [];
|
this.navigationModalStack = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
clearNavigationOverlays = () => {
|
|
||||||
this.overlays = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
getAllNavigationComponents = () => this.allNavigationComponentIds;
|
getAllNavigationComponents = () => this.allNavigationComponentIds;
|
||||||
|
|
||||||
getNavigationTopComponentId = () => {
|
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) => {
|
setVisibleTap = (tab: string) => {
|
||||||
this.visibleTab = tab;
|
this.visibleTab = tab;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user