aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/src/services
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2023-04-21 15:41:49 +0200
committerJohn Molakvoæ <skjnldsv@protonmail.com>2023-04-21 15:49:54 +0200
commitea9099a72f37b07ce689e25133ddca07f52cda64 (patch)
tree6b677e17dae423a3190335be086d9c1497bdac54 /apps/files/src/services
parentcae00d2e965931efeb6ca5386d4dd2cff9f7dc62 (diff)
downloadnextcloud-server-ea9099a72f37b07ce689e25133ddca07f52cda64.tar.gz
nextcloud-server-ea9099a72f37b07ce689e25133ddca07f52cda64.zip
feat(files): allow navigation entry removal
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/src/services')
-rw-r--r--apps/files/src/services/Navigation.ts7
1 files changed, 7 insertions, 0 deletions
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
}