From 97d9764f015990b1df01463c45090c4cbc2192fa Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 23 Jun 2021 22:14:01 +0200 Subject: if there are no messages display that there are no messages --- Zotlabs/Widget/Messages.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'Zotlabs/Widget/Messages.php') diff --git a/Zotlabs/Widget/Messages.php b/Zotlabs/Widget/Messages.php index 95f3d4eb6..9679631c6 100644 --- a/Zotlabs/Widget/Messages.php +++ b/Zotlabs/Widget/Messages.php @@ -11,14 +11,10 @@ class Messages { if (!local_channel()) return EMPTY_STR; - $o = ''; $page = self::get_messages_page($options); - if (!$page['entries']) - return $o; - $tpl = get_markup_template('messages_widget.tpl'); - $o .= replace_macros($tpl, [ + $o = replace_macros($tpl, [ '$entries' => $page['entries'], '$offset' => $page['offset'], '$feature_star' => feature_enabled(local_channel(), 'star_posts'), @@ -26,7 +22,8 @@ class Messages { 'messages_title' => t('Public and restricted messages'), 'direct_messages_title' => t('Direct messages'), 'starred_messages_title' => t('Starred messages'), - 'loading' => t('Loading') + 'loading' => t('Loading'), + 'empty' => t('No messages') ] ]); -- cgit v1.2.3