mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix build due to removal of old extended collections (#4779)
This commit is contained in:
1 parent
ac42a6565f
commit
0b1696fe16
8 files changed
+41
-65
No files matched your search
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { action, comparer, computed, IReactionDisposer, makeObservable, reaction } from "mobx";
|
||||
import { autoBind, noop, StorageHelper, ToggleSet } from "../../../utils";
|
||||
import { autoBind, noop, StorageHelper, toggle } from "../../../utils";
|
||||
import { KubeObjectStore, KubeObjectStoreLoadingParams } from "../../../../common/k8s-api/kube-object.store";
|
||||
import { Namespace, namespacesApi } from "../../../../common/k8s-api/endpoints/namespaces.api";
|
||||
|
||||
@@ -175,10 +175,10 @@ export class NamespaceStore extends KubeObjectStore<Namespace> {
|
||||
*/
|
||||
@action
|
||||
toggleContext(namespaces: string | string[]) {
|
||||
const nextState = new ToggleSet(this.contextNamespaces);
|
||||
const nextState = new Set(this.contextNamespaces);
|
||||
|
||||
for (const namespace of [namespaces].flat()) {
|
||||
nextState.toggle(namespace);
|
||||
toggle(nextState, namespace);
|
||||
}
|
||||
|
||||
this.dependencies.storage.set([...nextState]);
|
||||
@@ -191,9 +191,9 @@ export class NamespaceStore extends KubeObjectStore<Namespace> {
|
||||
* @param namespace The name of a namespace
|
||||
*/
|
||||
toggleSingle(namespace: string) {
|
||||
const nextState = new ToggleSet(this.contextNamespaces);
|
||||
const nextState = new Set(this.contextNamespaces);
|
||||
|
||||
nextState.toggle(namespace);
|
||||
toggle(nextState, namespace);
|
||||
this.dependencies.storage.set([...nextState]);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user