Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15425767
D11963.id28804.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11963.id28804.diff
View Options
diff --git a/src/view/control/AphrontCursorPagerView.php b/src/view/control/AphrontCursorPagerView.php
--- a/src/view/control/AphrontCursorPagerView.php
+++ b/src/view/control/AphrontCursorPagerView.php
@@ -79,6 +79,10 @@
return $results;
}
+ final public function getHasMoreResults() {
+ return $this->moreResults;
+ }
+
public function willShowPagingControls() {
return $this->prevPageID ||
$this->nextPageID ||
diff --git a/src/view/phui/PHUITimelineView.php b/src/view/phui/PHUITimelineView.php
--- a/src/view/phui/PHUITimelineView.php
+++ b/src/view/phui/PHUITimelineView.php
@@ -94,6 +94,9 @@
$hide = array();
$show = array();
+ // Bucket timeline events into events we'll hide by default (because they
+ // predate your most recent interaction with the object) and events we'll
+ // show by default.
foreach ($this->events as $event) {
if ($event->getHideByDefault()) {
$hide[] = $event;
@@ -102,8 +105,18 @@
}
}
+ // If you've never interacted with the object, all the events will be shown
+ // by default. We may still need to paginate if there are a large number
+ // of events.
+ $more = (bool)$hide;
+ if ($this->getPager()) {
+ if ($this->getPager()->getHasMoreResults()) {
+ $more = true;
+ }
+ }
+
$events = array();
- if ($hide && $this->getPager()) {
+ if ($more && $this->getPager()) {
$uri = $this->getPager()->getNextPageURI();
$uri->setQueryParam('quoteTargetID', $this->getQuoteTargetID());
$uri->setQueryParam('quoteRef', $this->getQuoteRef());
@@ -125,10 +138,10 @@
),
pht('Show older changes.')),
));
- }
- if ($hide && $show) {
- $events[] = $spacer;
+ if ($show) {
+ $events[] = $spacer;
+ }
}
if ($show) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 24, 5:57 AM (15 h, 3 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7605561
Default Alt Text
D11963.id28804.diff (1 KB)
Attached To
Mode
D11963: Show "Show Older" for transactions the user has not interacted with
Attached
Detach File
Event Timeline
Log In to Comment