Restore display when there aren't unread notifications

This commit is contained in:
Hypolite Petovan 2018-09-06 18:42:57 -04:00
parent e735a14db9
commit 2f7ba13702

View file

@ -308,18 +308,15 @@ function notifications_content(App $a)
'$item_seen' => $it['seen'], '$item_seen' => $it['seen'],
]); ]);
} }
} else {
$notif_show_lnk = [ $notif_nocontent = L10n::t('No more %s notifications.', $notifs['ident']);
'href' => ($show ? 'notifications/'.$notifs['ident'] : 'notifications/'.$notifs['ident'].'?show=all' ),
'text' => ($show ? L10n::t('Show unread') : L10n::t('Show all')),
];
// Output if there aren't any notifications available
if (count($notifs['notifications']) == 0) {
$notif_nocontent = L10n::t('No more %s notifications.', $notifs['ident']);
}
} }
$notif_show_lnk = [
'href' => ($show ? 'notifications/'.$notifs['ident'] : 'notifications/'.$notifs['ident'].'?show=all' ),
'text' => ($show ? L10n::t('Show unread') : L10n::t('Show all')),
];
$o .= replace_macros($notif_tpl, [ $o .= replace_macros($notif_tpl, [
'$notif_header' => $notif_header, '$notif_header' => $notif_header,
'$tabs' => $tabs, '$tabs' => $tabs,