Timeline classes are split into multiple classes

This commit is contained in:
Michael 2023-10-05 05:36:12 +00:00
parent 5d6e02bef3
commit 6a86eeda10
19 changed files with 523 additions and 173 deletions

View file

@ -562,19 +562,19 @@ class Widget
$enabled = DI::pConfig()->get($uid, 'system', 'enabled_timelines', []);
foreach (DI::TimelineFactory()->getNetworkFeeds('') as $channel) {
foreach (DI::NetworkFactory()->getTimelines('') as $channel) {
if (empty($enabled) || in_array($channel->code, $enabled)) {
$channels[] = ['ref' => $channel->code, 'name' => $channel->label];
}
}
foreach (DI::TimelineFactory()->getChannelsForUser($uid) as $channel) {
foreach (DI::ChannelFactory()->getForUser($uid) as $channel) {
if (empty($enabled) || in_array($channel->code, $enabled)) {
$channels[] = ['ref' => $channel->code, 'name' => $channel->label];
}
}
foreach (DI::TimelineFactory()->getCommunities(true) as $community) {
foreach (DI::CommunityFactory()->getTimelines(true) as $community) {
if (empty($enabled) || in_array($community->code, $enabled)) {
$channels[] = ['ref' => $community->code, 'name' => $community->label];
}