hide poll response notices from threaded view
This commit is contained in:
parent
c382a1d8cc
commit
b80ece1691
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user