mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Fix unexpected desktop mode on mobile devices + small fixes (#1514)
This commit is contained in:
parent
677a5f2e35
commit
ed5685314e
10 changed files with 115 additions and 88 deletions
|
|
@ -67,7 +67,10 @@ class SubStreams
|
|||
|
||||
$sHashName = \MailSo\Base\Utils::Md5Rand();
|
||||
|
||||
self::$aStreams[$sHashName] = $aSubStreams;
|
||||
self::$aStreams[$sHashName] = array_map(function($mItem) {
|
||||
return \is_resource($mItem) ? $mItem :
|
||||
\MailSo\Base\ResourceRegistry::CreateMemoryResourceFromString($mItem);
|
||||
}, $aSubStreams);
|
||||
|
||||
\MailSo\Base\Loader::IncStatistic('CreateStream/SubStreams');
|
||||
|
||||
|
|
@ -181,26 +184,6 @@ class SubStreams
|
|||
$this->iIndex++;
|
||||
}
|
||||
}
|
||||
else if (\is_string($mCurrentPart))
|
||||
{
|
||||
$sReadResult = \substr($mCurrentPart, 0, $iCount);
|
||||
|
||||
$sReturn .= $sReadResult;
|
||||
|
||||
$iLen = \strlen($sReadResult);
|
||||
if ($iCount < $iLen)
|
||||
{
|
||||
$this->sBuffer = \substr($sReturn, $iCount);
|
||||
$sReturn = \substr($sReturn, 0, $iCount);
|
||||
$iCount = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$iCount -= $iLen;
|
||||
}
|
||||
|
||||
$this->iIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue