Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2017-02-27 16:02:06 +0300
committerSergey Yershov <syershov@maps.me>2017-02-27 16:04:50 +0300
commit4855a63f126fc4ccd4ff32f58304070af9516765 (patch)
tree6443de2f4137426cc45c15ec1a82e3db84ee608a /storage
parent73005eada243d14bf7a6ff19e1375b25ffba2c3e (diff)
Fixed PushWoosh kMapLastDownloaded sending
Diffstat (limited to 'storage')
-rw-r--r--storage/storage.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/storage/storage.cpp b/storage/storage.cpp
index ee21d5c092..0984dd2683 100644
--- a/storage/storage.cpp
+++ b/storage/storage.cpp
@@ -702,6 +702,19 @@ void Storage::OnMapFileDownloadFinished(bool success,
}
OnMapDownloadFinished(countryId, success, queuedCountry.GetInitOptions());
+
+ // Send stastics to Push Woosh.
+ if (success)
+ {
+ GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kMapLastDownloaded, countryId);
+ char nowStr[18]{};
+ auto const tp = std::chrono::system_clock::from_time_t(time(nullptr));
+ tm now = my::GmTime(std::chrono::system_clock::to_time_t(tp));
+ strftime(nowStr, sizeof(nowStr), "%Y-%m-%d %H:%M", &now);
+ GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kMapLastDownloadedTimestamp,
+ std::string(nowStr));
+ }
+
CorrectJustDownloadedAndQueue(m_queue.begin());
SaveDownloadQueue();
@@ -1560,18 +1573,6 @@ bool Storage::GetUpdateInfo(TCountryId const & countryId, UpdateInfo & updateInf
void Storage::CorrectJustDownloadedAndQueue(TQueue::iterator justDownloadedItem)
{
- // Send stastics to Push Woosh.
- {
- GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kMapLastDownloaded,
- justDownloadedItem->GetCountryId());
- char nowStr[18]{};
- auto const tp = std::chrono::system_clock::from_time_t(time(nullptr));
- tm now = my::GmTime(std::chrono::system_clock::to_time_t(tp));
- strftime(nowStr, sizeof(nowStr), "%Y-%m-%d %H:%M", &now);
- GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kMapLastDownloadedTimestamp,
- std::string(nowStr));
- }
-
m_justDownloaded.insert(justDownloadedItem->GetCountryId());
m_queue.erase(justDownloadedItem);
if (m_queue.empty())