From 2f7ba1370226bbcb97fd6b9f9b737b8462ce97ac Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 6 Sep 2018 18:42:57 -0400 Subject: [PATCH] Restore display when there aren't unread notifications --- mod/notifications.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/mod/notifications.php b/mod/notifications.php index 091323d998..5feb3be19a 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -308,18 +308,15 @@ function notifications_content(App $a) '$item_seen' => $it['seen'], ]); } - - $notif_show_lnk = [ - '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']); - } + } else { + $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, [ '$notif_header' => $notif_header, '$tabs' => $tabs, -- 2.39.5