mirror of
https://github.com/friendica/friendica
synced 2025-04-26 23:50:11 +00:00
Improved timeline menu
This commit is contained in:
parent
073da9735d
commit
fac76a33df
4 changed files with 74 additions and 22 deletions
|
@ -560,16 +560,24 @@ class Widget
|
|||
{
|
||||
$channels = [];
|
||||
|
||||
$enabled = DI::pConfig()->get($uid, 'system', 'enabled_timelines', []);
|
||||
|
||||
foreach (DI::TimelineFactory()->getNetworkFeeds('') as $channel) {
|
||||
$channels[] = ['ref' => $channel->code, 'name' => $channel->label];
|
||||
if (empty($enabled) || in_array($channel->code, $enabled)) {
|
||||
$channels[] = ['ref' => $channel->code, 'name' => $channel->label];
|
||||
}
|
||||
}
|
||||
|
||||
foreach (DI::TimelineFactory()->getChannelsForUser($uid) as $channel) {
|
||||
$channels[] = ['ref' => $channel->code, 'name' => $channel->label];
|
||||
if (empty($enabled) || in_array($channel->code, $enabled)) {
|
||||
$channels[] = ['ref' => $channel->code, 'name' => $channel->label];
|
||||
}
|
||||
}
|
||||
|
||||
foreach (DI::TimelineFactory()->getCommunities(true) as $community) {
|
||||
$channels[] = ['ref' => $community->code, 'name' => $community->label];
|
||||
if (empty($enabled) || in_array($community->code, $enabled)) {
|
||||
$channels[] = ['ref' => $community->code, 'name' => $community->label];
|
||||
}
|
||||
}
|
||||
|
||||
return self::filter(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue