forked from organicmaps/organicmaps
[bookmarks] Added a new method of getting the category id by the server id.
This commit is contained in:
parent
ee4ba01276
commit
1597351c65
2 changed files with 12 additions and 0 deletions
|
@ -3620,6 +3620,17 @@ bool BookmarkManager::IsCategoryFromCatalog(kml::MarkGroupId categoryId) const
|
|||
return cat->IsCategoryFromCatalog();
|
||||
}
|
||||
|
||||
kml::MarkGroupId BookmarkManager::GetCategoryIdByServerId(std::string const & serverId) const
|
||||
{
|
||||
CHECK_THREAD_CHECKER(m_threadChecker, ());
|
||||
for (auto const & category : m_categories)
|
||||
{
|
||||
if (category.second->GetServerId() == serverId)
|
||||
return category.first;
|
||||
}
|
||||
return kml::kInvalidMarkGroupId;
|
||||
}
|
||||
|
||||
std::string BookmarkManager::GetCategoryServerId(kml::MarkGroupId categoryId) const
|
||||
{
|
||||
CHECK_THREAD_CHECKER(m_threadChecker, ());
|
||||
|
|
|
@ -402,6 +402,7 @@ public:
|
|||
void ImportDownloadedFromCatalog(std::string const & id, std::string const & filePath);
|
||||
void UploadToCatalog(kml::MarkGroupId categoryId, kml::AccessRules accessRules);
|
||||
bool IsCategoryFromCatalog(kml::MarkGroupId categoryId) const;
|
||||
kml::MarkGroupId GetCategoryIdByServerId(std::string const & serverId) const;
|
||||
std::string GetCategoryServerId(kml::MarkGroupId categoryId) const;
|
||||
std::string GetCategoryCatalogDeeplink(kml::MarkGroupId categoryId) const;
|
||||
std::string GetCategoryCatalogPublicLink(kml::MarkGroupId categoryId) const;
|
||||
|
|
Loading…
Add table
Reference in a new issue