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

View File

@ -480,4 +480,18 @@ class PollPlugin extends MicroAppPlugin
// TRANS: Application title. // TRANS: Application title.
return _m('APPTITLE','Poll'); 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);
}
} }