mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 14:37:02 +03:00
Added counters of unread messages for additional accounts (#377)
This commit is contained in:
parent
abddb3d828
commit
79233ad83c
19 changed files with 333 additions and 93 deletions
|
|
@ -869,6 +869,24 @@ class MailClient
|
|||
return self::GenerateHash($sFolderName, $iCount, $iUnseenCount, $sUidNext);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*
|
||||
* @throws \MailSo\Net\Exceptions\Exception
|
||||
* @throws \MailSo\Imap\Exceptions\Exception
|
||||
*/
|
||||
public function InboxUnreadCount()
|
||||
{
|
||||
$aFolderStatus = $this->oImapClient->FolderStatus('INBOX', array(
|
||||
\MailSo\Imap\Enumerations\FolderResponseStatus::UNSEEN
|
||||
));
|
||||
|
||||
$iResult = isset($aFolderStatus[\MailSo\Imap\Enumerations\FolderResponseStatus::UNSEEN]) ?
|
||||
(int) $aFolderStatus[\MailSo\Imap\Enumerations\FolderResponseStatus::UNSEEN] : 0;
|
||||
|
||||
return 0 < $iResult ? $iResult : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sSearch
|
||||
* @param bool $bDetectGmail = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue