mirror of
https://github.com/friendica/friendica
synced 2025-04-30 15:44:24 +02:00
Performance improvements when displaying local posts
This commit is contained in:
parent
bae1f63424
commit
c82a1ed467
16 changed files with 1101 additions and 28 deletions
|
@ -21,6 +21,7 @@
|
|||
|
||||
namespace Friendica\Content\Widget;
|
||||
|
||||
use Friendica\Content\Conversation\Entity\Community;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Tag;
|
||||
|
@ -39,9 +40,9 @@ class TrendingTags
|
|||
* @return string Formatted HTML code
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function getHTML(string $content = 'global', int $period = 24): string
|
||||
public static function getHTML(string $content = Community::GLOBAL, int $period = 24): string
|
||||
{
|
||||
if ($content == 'local') {
|
||||
if ($content == Community::LOCAL) {
|
||||
$tags = Tag::getLocalTrendingHashtags($period, 20);
|
||||
} else {
|
||||
$tags = Tag::getGlobalTrendingHashtags($period, 20);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue