Rework theme override in Profile::load and App

- Separate desktop theme from mobile theme in App
This commit is contained in:
Hypolite Petovan 2019-10-06 12:07:06 -04:00
parent e5fbaf6a00
commit ead0defb48
2 changed files with 81 additions and 31 deletions

View file

@ -20,6 +20,7 @@ use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Core\Session;
use Friendica\Core\System;
use Friendica\Core\Theme;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\Protocol\Diaspora;
@ -189,11 +190,10 @@ class Profile
$a->page['title'] = $a->profile['name'] . ' @ ' . Config::get('config', 'sitename');
if (!$profiledata && !PConfig::get(local_user(), 'system', 'always_my_theme')) {
$_SESSION['theme'] = $a->profile['theme'];
$a->setCurrentTheme($a->profile['theme']);
$a->setCurrentMobileTheme($a->profile['mobile-theme']);
}
$_SESSION['mobile-theme'] = $a->profile['mobile-theme'];
/*
* load/reload current theme info
*/