Skip to content

Commit 1febd32

Browse files
author
vrana
committed
Don't hide columns with stats from previous age, hide columns with no data
Summary: This does two things: - don't fill '-' for columns where there are data from previous week - completele hide columns if there are now new data so that noobs don't have a 55 years of history Test Plan: View my commits stats. View my requested changes stats. View epriestley FB stats. Reviewers: vii, epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1750
1 parent d8c601f commit 1febd32

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/applications/differential/view/revisionstats/DifferentialRevisionStatsView.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,12 @@ public function render() {
101101
}
102102

103103
$old_count = 0;
104-
foreach ($dates as $age => $cutoff) {
104+
foreach (array_reverse($dates) as $age => $cutoff) {
105105
$weeks = ($now - $cutoff + 0.) / (7 * 60 * 60 * 24);
106-
if ($old_count == $counts[$age]) {
107-
continue;
106+
if ($old_count == $counts[$age] && count($row_array) == 1) {
107+
end($row_array);
108+
unset($dates[key($row_array)]);
109+
$row_array = array();
108110
}
109111
$old_count = $counts[$age];
110112

0 commit comments

Comments
 (0)