forked from organicmaps/organicmaps
[bookmarks] helper methods for compilations. review fixes
This commit is contained in:
parent
aefa9bf26f
commit
ecd03ce3a1
4 changed files with 9 additions and 11 deletions
|
@ -1264,8 +1264,8 @@ Java_com_mapswithme_maps_bookmarks_data_BookmarkManager_nativeGetChildrenCategor
|
|||
|
||||
JNIEXPORT jobjectArray JNICALL
|
||||
Java_com_mapswithme_maps_bookmarks_data_BookmarkManager_nativeGetChildrenCollections(JNIEnv *env,
|
||||
jobject,
|
||||
jlong parentId)
|
||||
jobject,
|
||||
jlong parentId)
|
||||
{
|
||||
auto const & bm = frm()->GetBookmarkManager();
|
||||
auto const ids = bm.GetChildrenCollections(static_cast<kml::MarkGroupId>(parentId));
|
||||
|
@ -1274,18 +1274,16 @@ Java_com_mapswithme_maps_bookmarks_data_BookmarkManager_nativeGetChildrenCollect
|
|||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_com_mapswithme_maps_bookmarks_data_BookmarkManager_nativeIsBookmarkCompilation(JNIEnv *env,
|
||||
jobject,
|
||||
jlong id)
|
||||
Java_com_mapswithme_maps_bookmarks_data_BookmarkManager_nativeIsCompilation(JNIEnv *env, jobject,
|
||||
jlong id)
|
||||
{
|
||||
auto const & bm = frm()->GetBookmarkManager();
|
||||
return static_cast<jboolean>(bm.IsBookmarkCompilation(static_cast<kml::MarkGroupId>(id)));
|
||||
return static_cast<jboolean>(bm.IsCompilation(static_cast<kml::MarkGroupId>(id)));
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_com_mapswithme_maps_bookmarks_data_BookmarkManager_nativeGetCompilationType(JNIEnv *env,
|
||||
jobject,
|
||||
jlong id)
|
||||
jobject, jlong id)
|
||||
{
|
||||
auto const & bm = frm()->GetBookmarkManager();
|
||||
return static_cast<jint>(bm.GetCompilationType(static_cast<kml::MarkGroupId>(id)));
|
||||
|
|
|
@ -893,7 +893,7 @@ public enum BookmarkManager
|
|||
@NonNull
|
||||
native BookmarkCategory[] nativeGetChildrenCollections(long catId);
|
||||
|
||||
native boolean nativeIsBookmarkCompilation(long catId);
|
||||
native boolean nativeIsCompilation(long catId);
|
||||
native int nativeGetCompilationType(long catId);
|
||||
|
||||
@NonNull
|
||||
|
|
|
@ -1393,7 +1393,7 @@ kml::GroupIdCollection BookmarkManager::GetCompilationOfType(kml::MarkGroupId pa
|
|||
return result;
|
||||
}
|
||||
|
||||
bool BookmarkManager::IsBookmarkCompilation(kml::MarkGroupId id) const
|
||||
bool BookmarkManager::IsCompilation(kml::MarkGroupId id) const
|
||||
{
|
||||
CHECK_THREAD_CHECKER(m_threadChecker, ());
|
||||
return m_compilations.find(id) != m_compilations.cend();
|
||||
|
|
|
@ -508,7 +508,7 @@ public:
|
|||
kml::GroupIdCollection GetChildrenCategories(kml::MarkGroupId parentCategoryId) const;
|
||||
kml::GroupIdCollection GetChildrenCollections(kml::MarkGroupId parentCategoryId) const;
|
||||
|
||||
bool IsBookmarkCompilation(kml::MarkGroupId id) const;
|
||||
bool IsCompilation(kml::MarkGroupId id) const;
|
||||
kml::CompilationType GetCompilationType(kml::MarkGroupId id) const;
|
||||
|
||||
std::vector<std::string> GetAllPaidCategoriesIds() const;
|
||||
|
|
Loading…
Add table
Reference in a new issue