forked from organicmaps/organicmaps
[bookmarks] no need to show PreviewPlus state when description is empty
This commit is contained in:
parent
18c863bb3c
commit
4dc76d415b
2 changed files with 8 additions and 1 deletions
|
@ -72,6 +72,12 @@ inline std::string GetDefaultStr(LocalizableString const & str)
|
|||
|
||||
inline void SetDefaultStr(LocalizableString & localizableStr, std::string const & str)
|
||||
{
|
||||
if (str.empty())
|
||||
{
|
||||
localizableStr.erase(kDefaultLangCode);
|
||||
return;
|
||||
}
|
||||
|
||||
localizableStr[kDefaultLangCode] = str;
|
||||
}
|
||||
|
||||
|
|
|
@ -767,7 +767,8 @@ void Framework::FillBookmarkInfo(Bookmark const & bmk, place_page::Info & info)
|
|||
info.SetBookmarkData(bmk.GetData());
|
||||
info.SetBookmarkId(bmk.GetId());
|
||||
info.SetBookmarkCategoryId(bmk.GetGroupId());
|
||||
auto openingMode = m_routingManager.IsRoutingActive()
|
||||
auto const description = GetPreferredBookmarkStr(info.GetBookmarkData().m_description);
|
||||
auto const openingMode = m_routingManager.IsRoutingActive() || description.empty()
|
||||
? place_page::OpeningMode::Preview
|
||||
: place_page::OpeningMode::PreviewPlus;
|
||||
info.SetOpeningMode(openingMode);
|
||||
|
|
Loading…
Add table
Reference in a new issue