fix: reuse default navigation entry when updating navigation entries

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/52082/head
Robin Appelman 9 months ago
parent b82245ddea
commit aa34f2f457
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
  1. 3
      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;
}
}
}

Loading…
Cancel
Save