summaryrefslogtreecommitdiff
path: root/program/steps/mail/func.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-11-04 13:48:17 +0000
committeralecpl <alec@alec.pl>2010-11-04 13:48:17 +0000
commit29b39739df3393f138dbdd98591e1331af0393ad (patch)
tree91ac6b8d3b4f4ac1fb55f8e3ba2402db1d9e3501 /program/steps/mail/func.inc
parentb8d8cbda4535f76c468364ebbdb81d856ed8322c (diff)
- Improve responsiveness of messages displaying (#1486986)
Diffstat (limited to 'program/steps/mail/func.inc')
-rw-r--r--program/steps/mail/func.inc17
1 files changed, 6 insertions, 11 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 11df12845..1237c9214 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -423,14 +423,16 @@ function rcmail_messagecontent_frame($attrib)
function rcmail_messagecount_display($attrib)
{
- global $IMAP, $OUTPUT;
+ global $RCMAIL;
if (!$attrib['id'])
$attrib['id'] = 'rcmcountdisplay';
- $OUTPUT->add_gui_object('countdisplay', $attrib['id']);
+ $RCMAIL->output->add_gui_object('countdisplay', $attrib['id']);
+
+ $content = $RCMAIL->action != 'show' ? rcmail_get_messagecount_text() : rcube_label('loading');
- return html::span($attrib, rcmail_get_messagecount_text());
+ return html::span($attrib, $content);
}
@@ -495,14 +497,7 @@ function rcmail_quota_content($attrib=NULL)
function rcmail_get_messagecount_text($count=NULL, $page=NULL)
{
- global $RCMAIL, $IMAP, $MESSAGE;
-
- if (isset($MESSAGE->index))
- {
- return rcube_label(array('name' => 'messagenrof',
- 'vars' => array('nr' => $MESSAGE->index+1,
- 'count' => $count!==NULL ? $count : $IMAP->messagecount(NULL, 'ALL')))); // Only messages, no threads here
- }
+ global $RCMAIL, $IMAP;
if ($page===NULL)
$page = $IMAP->list_page;