Auto merge of #27522 - jdm:home-override, r=paulrouget

Use override value for home button when available.

Fixes #27521.
This commit is contained in:
bors-servo 2020-08-07 06:26:59 -04:00 committed by GitHub
commit 4d1b96e605
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -386,8 +386,13 @@ void Servo::GoHome() {
ApplicationData::Current().LocalSettings(); ApplicationData::Current().LocalSettings();
auto prefs = localSettings.Containers().Lookup(L"servoUserPrefs"); auto prefs = localSettings.Containers().Lookup(L"servoUserPrefs");
auto home_pref = prefs.Values().Lookup(L"shell.homepage"); auto home_pref = prefs.Values().Lookup(L"shell.homepage");
auto home = auto home = home_pref ? unbox_value<hstring>(home_pref) :
home_pref ? unbox_value<hstring>(home_pref) : FALLBACK_DEFAULT_URL; #ifdef OVERRIDE_DEFAULT_URL
OVERRIDE_DEFAULT_URL
#else
FALLBACK_DEFAULT_URL
#endif
;
LoadUri(home); LoadUri(home);
} }