diff options
author | Robin Appelman <robin@icewind.nl> | 2025-04-09 18:39:42 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2025-04-09 18:39:42 +0200 |
commit | aa34f2f4571b2512ebd90e61e1f1cd6d9d50ebef (patch) | |
tree | 324225d3f5631b381024db1e140ed8c6b4c703f6 | |
parent | b82245ddea2db5bf1f2211199811454a5dbc0ee1 (diff) | |
download | nextcloud-server-default-navigation-reuse.tar.gz nextcloud-server-default-navigation-reuse.zip |
fix: reuse default navigation entry when updating navigation entriesdefault-navigation-reuse
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | lib/private/NavigationManager.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/NavigationManager.php b/lib/private/NavigationManager.php index 83d26c7ca63..c2125bc6f8a 100644 --- a/lib/private/NavigationManager.php +++ b/lib/private/NavigationManager.php @@ -110,9 +110,10 @@ class NavigationManager implements INavigationManager { } private function updateDefaultEntries() { + $defaultEntryId = $this->getDefaultEntryIdForUser($this->userSession->getUser(), false); foreach ($this->entries as $id => $entry) { if ($entry['type'] === 'link') { - $this->entries[$id]['default'] = $id === $this->getDefaultEntryIdForUser($this->userSession->getUser(), false); + $this->entries[$id]['default'] = $id === $defaultEntryId; } } } |