| 3129 | } |
| 3130 | |
| 3131 | void BookmarkManager::SaveBookmarks(kml::GroupIdCollection const & groupIdCollection) |
| 3132 | { |
| 3133 | CHECK_THREAD_CHECKER(m_threadChecker, ()); |
| 3134 | |
| 3135 | if (groupIdCollection.empty()) |
| 3136 | return; |
| 3137 | |
| 3138 | auto kmlDataCollection = PrepareToSaveBookmarks(groupIdCollection); |
| 3139 | if (!kmlDataCollection) |
| 3140 | return; |
| 3141 | |
| 3142 | if (m_testModeEnabled) |
| 3143 | { |
| 3144 | // Save bookmarks synchronously. |
| 3145 | for (auto const & kmlItem : *kmlDataCollection) |
| 3146 | SaveKmlFileByExt(*kmlItem.second, kmlItem.first); |
| 3147 | return; |
| 3148 | } |
| 3149 | |
| 3150 | GetPlatform().RunTask(Platform::Thread::File, [kmlDataCollection = std::move(kmlDataCollection)]() |
| 3151 | { |
| 3152 | for (auto const & kmlItem : *kmlDataCollection) |
| 3153 | SaveKmlFileByExt(*kmlItem.second, kmlItem.first); |
| 3154 | }); |
| 3155 | } |
| 3156 | |
| 3157 | void BookmarkManager::PrepareTrackFileForSharing(kml::TrackId trackId, SharingHandler && handler, |
| 3158 | KmlFileType kmlFileType) |
nothing calls this directly
no test coverage detected