mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-05-15 06:30:26 +02:00
03826fe58b
Two regressions stacked from the recent tree work: 1. expandAllFolders (#496) was marking every folder open, including folders whose children weren't fetched yet. The directive then rendered an empty <ul> after each <a>, and the openFolder handler's "no sibling means we need to load" check silently treated the empty <ul> as already-loaded — so clicking the folder toggled the class but the children never appeared. Skip folders with empty children when pre-expanding, and harden the click handler so an empty <ul> still triggers a fetch. 2. The $routeUpdate handler (#510 follow-up) became async and called $scope.$apply(updateContent) at the end. Inside an already-running digest cycle this no-ops or throws, leaving file navigation stuck. Run updateContent() synchronously like before, and kick off any missing parent-directory fetches in the background — getContent() already falls back to sha "0" when the metadata isn't loaded yet.