From fbc18a3c67c732e3daad50c61b858b3e1593e1fb Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 7 Apr 2011 15:35:00 -0400 Subject: [PATCH] change apitimelinehome to use InboxNoticeStream --- actions/apitimelinehome.php | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/actions/apitimelinehome.php b/actions/apitimelinehome.php index 96642cbfab..3c18a5b0bf 100644 --- a/actions/apitimelinehome.php +++ b/actions/apitimelinehome.php @@ -192,19 +192,12 @@ class ApiTimelineHomeAction extends ApiBareAuthAction { $notices = array(); - if (!empty($this->auth_user) && $this->auth_user->id == $this->user->id) { - $notice = $this->user->noticeInbox( - ($this->page-1) * $this->count, - $this->count, $this->since_id, - $this->max_id - ); - } else { - $notice = $this->user->noticesWithFriends( - ($this->page-1) * $this->count, - $this->count, $this->since_id, - $this->max_id - ); - } + $stream = new InboxNoticeStream($this->user); + + $notice = $stream->getNotices(($this->page-1) * $this->count, + $this->count, + $this->since_id, + $this->max_id); while ($notice->fetch()) { $notices[] = clone($notice); -- 2.39.2