fix: reuse default navigation entry when updating navigation entries

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2025-04-09 18:39:42 +02:00
parent b82245ddea
commit aa34f2f457
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

View file

@ -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;
}
}
}