mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 22:47:03 +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
|
|
@ -162,18 +162,20 @@ class Service
|
|||
$bMobileDevice = $oMobileDetect->isMobile() &&
|
||||
($bUseMobileVersionForTablets ? true : !$oMobileDetect->isTablet());
|
||||
|
||||
$bMobile = (0 < \count($aPaths) && !empty($aPaths[0]) && 'mobile' === \strtolower($aPaths[0]));
|
||||
}
|
||||
|
||||
if ($bIndex && !$bMobile)
|
||||
{
|
||||
$iMobileKey = (int) \RainLoop\Utils::GetCookie(\RainLoop\Actions::RL_SKIP_MOBILE_KEY, 0);
|
||||
if (1 !== $iMobileKey)
|
||||
if ($bIndex)
|
||||
{
|
||||
if ($bMobileDevice)
|
||||
{
|
||||
$this->oActions->Location('./?/Mobile/');
|
||||
return $this;
|
||||
$sMobileType = (string) \RainLoop\Utils::GetCookie(\RainLoop\Actions::RL_MOBILE_TYPE, '');
|
||||
switch ($sMobileType) {
|
||||
default:
|
||||
$sMobileType = '';
|
||||
$bMobile = $bMobileDevice;
|
||||
break;
|
||||
case 'mobile':
|
||||
$bMobile = true;
|
||||
break;
|
||||
case 'desktop':
|
||||
$bMobile = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue