| 768 | } |
| 769 | |
| 770 | void Editor::SaveUploadedInformation(FeatureID const & fid, UploadInfo const & uploadInfo) |
| 771 | { |
| 772 | CHECK_THREAD_CHECKER(MainThreadChecker, ("")); |
| 773 | |
| 774 | auto const features = m_features.Get(); |
| 775 | auto editableFeatures = make_shared<FeaturesContainer>(*features); |
| 776 | |
| 777 | auto id = editableFeatures->find(fid.m_mwmId); |
| 778 | // Rare case: feature was deleted at the time of changes uploading. |
| 779 | if (id == editableFeatures->end()) |
| 780 | return; |
| 781 | |
| 782 | auto index = id->second.find(fid.m_index); |
| 783 | // Rare case: feature was deleted at the time of changes uploading. |
| 784 | if (index == id->second.end()) |
| 785 | return; |
| 786 | |
| 787 | auto & fti = index->second; |
| 788 | fti.m_uploadAttemptTimestamp = uploadInfo.m_uploadAttemptTimestamp; |
| 789 | fti.m_uploadStatus = uploadInfo.m_uploadStatus; |
| 790 | fti.m_uploadError = uploadInfo.m_uploadError; |
| 791 | |
| 792 | if (!NeedsUpload(uploadInfo.m_uploadStatus)) |
| 793 | fti.m_object.ClearJournal(); |
| 794 | |
| 795 | SaveTransaction(editableFeatures); |
| 796 | } |
| 797 | |
| 798 | bool Editor::FillFeatureInfo(FeatureStatus status, XMLFeature const & xml, FeatureID const & fid, |
| 799 | FeatureTypeInfo & fti) const |
nothing calls this directly
no test coverage detected