EnhancedChangesList: Don't render headings for empty days
authorRoan Kattouw <roan.kattouw@gmail.com>
Thu, 20 Jul 2017 18:38:52 +0000 (11:38 -0700)
committerRoan Kattouw <roan.kattouw@gmail.com>
Thu, 20 Jul 2017 18:38:52 +0000 (11:38 -0700)
commit11f9d532b450133e233c3250ca11f1ed249b1af9
treea2193586d6b4e3389e2e05d6635ece7d5b881fca
parent22cb66c175c99a95cfd05ae55749e86b195859e9
EnhancedChangesList: Don't render headings for empty days

EnhancedChangesList renders an <h4> for every day, but it
does so before it starts rendering the changes for that day.
If all of the changes for a different day fail to render
(due to permissions issues, extension hooks, or whatever)
this would result in an empty heading.

Instead, render the heading after formatting is complete,
so that if all changes for a given day are dropped,
the heading is also dropped.

Bug: T171078
Change-Id: I8a0c6cbd679976d18d2c2e6e9ac972fb7b294a42
includes/changes/EnhancedChangesList.php