]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Share/SharePlugin.php
Repeats shown in threaded noticelist now handled by plugin
[quix0rs-gnu-social.git] / plugins / Share / SharePlugin.php
index ec15f3ebdbce1d33326e795eb25658e734e7a79f..582f7d3e2e0de4e2a4b1d893230e59ba97052a97 100644 (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