From 7668d47e6da14878777fa586fc8c2072814c0f67 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 9 May 2015 10:05:21 -0700 Subject: [PATCH] Fix conduit result tables on mobile views Summary: Fixes T8139. These tables don't `setHeaders()`, so we don't correctly default columns to be visible on devices. Test Plan: Conduit results now visible on devices. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T8139 Differential Revision: https://secure.phabricator.com/D12784 --- src/view/control/AphrontTableView.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/view/control/AphrontTableView.php b/src/view/control/AphrontTableView.php index 9edd851c19..a6814a030e 100644 --- a/src/view/control/AphrontTableView.php +++ b/src/view/control/AphrontTableView.php @@ -124,6 +124,7 @@ final class AphrontTableView extends AphrontView { $visibility = array_values($this->columnVisibility); $device_visibility = array_values($this->deviceVisibility); + $headers = $this->headers; $short_headers = $this->shortHeaders; $sort_values = $this->sortValues; @@ -235,12 +236,16 @@ final class AphrontTableView extends AphrontView { if ($data) { $row_num = 0; foreach ($data as $row) { + $row_size = count($row); while (count($row) > count($col_classes)) { $col_classes[] = null; } while (count($row) > count($visibility)) { $visibility[] = true; } + while (count($row) > count($device_visibility)) { + $device_visibility[] = true; + } $tr = array(); // NOTE: Use of a separate column counter is to allow this to work // correctly if the row data has string or non-sequential keys.