Repeats shown in threaded noticelist now handled by plugin

This commit is contained in:
Mikael Nordfeldth
2015-03-12 19:49:20 +01:00
parent 940737a958
commit 20f8dd6565
7 changed files with 98 additions and 122 deletions

View File

@@ -174,7 +174,19 @@ class SharePlugin extends ActivityVerbHandlerPlugin
return true;
}
// API stuff
// Layout stuff
public function onEndShowThreadedNoticeTailItems(NoticeListItem $nli, Notice $notice, &$threadActive)
{
if ($nli instanceof ThreadedNoticeListSubItem) {
// The sub-items are replies to a conversation, thus we use different HTML elements etc.
$item = new ThreadedNoticeListInlineRepeatsItem($notice, $nli->out);
} else {
$item = new ThreadedNoticeListRepeatsItem($notice, $nli->out);
}
$threadActive = $item->show() || $threadActive;
return true;
}
/**
* show the "repeat" form in the notice options element