From ea9099a72f37b07ce689e25133ddca07f52cda64 Mon Sep 17 00:00:00 2001 From: John Molakvoæ Date: Fri, 21 Apr 2023 15:41:49 +0200 Subject: feat(files): allow navigation entry removal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- apps/files/src/services/Navigation.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'apps/files/src') diff --git a/apps/files/src/services/Navigation.ts b/apps/files/src/services/Navigation.ts index e86266013d7..b2ae3b0b973 100644 --- a/apps/files/src/services/Navigation.ts +++ b/apps/files/src/services/Navigation.ts @@ -126,6 +126,13 @@ export default class { this._views.push(view) } + remove(id: string) { + const index = this._views.findIndex(view => view.id === id) + if (index !== -1) { + this._views.splice(index, 1) + } + } + get views(): Navigation[] { return this._views } -- cgit v1.2.3