[map] add settings and menu cases to parse deeplink url types

Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
Kiryl Kaveryn 2024-09-26 16:31:14 +04:00 committed by Roman Tsisyk
parent 82650c29d1
commit d3ac3bab94
2 changed files with 14 additions and 0 deletions

View file

@ -175,6 +175,16 @@ ParsedMapApi::UrlType ParsedMapApi::SetUrlAndParse(std::string const & raw)
return m_requestType = UrlType::Crosshair;
}
else if (type == "menu")
{
/// @todo(KK): Implement path parsing to highlight the specific menu item.
return m_requestType = UrlType::Menu;
}
else if (type == "settings")
{
/// @todo(KK): Implement path parsing to navigate to the specific settings page and highlight the specific item.
return m_requestType = UrlType::Settings;
}
else if (type == "oauth2")
{
if (url.GetPath() != "osm/callback")
@ -485,6 +495,8 @@ std::string DebugPrint(ParsedMapApi::UrlType type)
case ParsedMapApi::UrlType::Search: return "Search";
case ParsedMapApi::UrlType::Crosshair: return "Crosshair";
case ParsedMapApi::UrlType::OAuth2: return "OAuth2";
case ParsedMapApi::UrlType::Menu: return "Menu";
case ParsedMapApi::UrlType::Settings: return "Settings";
}
UNREACHABLE();
}

View file

@ -46,6 +46,8 @@ public:
Search = 3,
Crosshair = 4,
OAuth2 = 5,
Menu = 6,
Settings = 7
};
ParsedMapApi() = default;