hide poll response notices from threaded view

This commit is contained in:
Evan Prodromou 2011-04-09 17:07:03 -04:00
parent c382a1d8cc
commit b80ece1691
1 changed files with 14 additions and 0 deletions

View File

@ -480,4 +480,18 @@ class PollPlugin extends MicroAppPlugin
// TRANS: Application title.
return _m('APPTITLE','Poll');
}
function onStartShowThreadedNoticeTail($nli, $notice, &$children)
{
// Filter out any poll responses
if ($notice->object_type == self::POLL_OBJECT) {
$children = array_filter($children, array($this, 'isNotPollResponse'));
}
return true;
}
function isNotPollResponse($notice)
{
return ($notice->object_type != self::POLL_RESPONSE_OBJECT);
}
}