| 3155 | } |
| 3156 | |
| 3157 | void BookmarkManager::PrepareTrackFileForSharing(kml::TrackId trackId, SharingHandler && handler, |
| 3158 | KmlFileType kmlFileType) |
| 3159 | { |
| 3160 | CHECK_THREAD_CHECKER(m_threadChecker, ()); |
| 3161 | ASSERT(handler, ()); |
| 3162 | auto collection = PrepareToSaveBookmarksForTrack(trackId); |
| 3163 | if (m_testModeEnabled) |
| 3164 | { |
| 3165 | handler(GetFileForSharing(std::move(collection), kmlFileType)); |
| 3166 | } |
| 3167 | else |
| 3168 | { |
| 3169 | GetPlatform().RunTask(Platform::Thread::File, [collection = std::move(collection), handler = std::move(handler), |
| 3170 | kmlFileType = kmlFileType]() mutable |
| 3171 | { handler(GetFileForSharing(std::move(collection), kmlFileType)); }); |
| 3172 | } |
| 3173 | } |
| 3174 | |
| 3175 | void BookmarkManager::PrepareFileForSharing(kml::GroupIdCollection && categoriesIds, SharingHandler && handler, |
| 3176 | KmlFileType kmlFileType) |