diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2018-09-07 15:42:20 +0300 |
---|---|---|
committer | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2018-09-07 16:02:05 +0300 |
commit | 46b18e44eb61dad2c5589df0a2937d7c7b306129 (patch) | |
tree | 955d5f5052baeeb5d5d1c7d8f04d4adccceef038 /map | |
parent | 15b5a09bbd89a61e2e16e0ee1a72fb08eb9ee126 (diff) |
[transit][eye] added eye event for public transport
Diffstat (limited to 'map')
-rw-r--r-- | map/transit/transit_reader.cpp | 10 | ||||
-rw-r--r-- | map/transit/transit_reader.hpp | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/map/transit/transit_reader.cpp b/map/transit/transit_reader.cpp index bc32c4b6a5..788b612bdc 100644 --- a/map/transit/transit_reader.cpp +++ b/map/transit/transit_reader.cpp @@ -7,6 +7,8 @@ #include "indexer/drules_include.hpp" #include "indexer/feature_algo.hpp" +#include "metrics/eye.hpp" + #include "coding/reader.hpp" #include "drape_frontend/drape_engine.hpp" @@ -178,6 +180,7 @@ void TransitReadManager::EnableTransitSchemeMode(bool enable) if (m_isSchemeMode == enable) return; m_isSchemeMode = enable; + m_trackFirstSchemeData = enable; m_drapeEngine.SafeCall(&df::DrapeEngine::EnableTransitScheme, enable); @@ -294,6 +297,13 @@ void TransitReadManager::UpdateViewport(ScreenBase const & screen) break; } } + + if (hasData && m_trackFirstSchemeData) + { + eye::Eye::Event::LayerUsed(eye::Layer::Type::PublicTransport); + m_trackFirstSchemeData = false; + } + ChangeState(hasData ? TransitSchemeState::Enabled : TransitSchemeState::NoData); } diff --git a/map/transit/transit_reader.hpp b/map/transit/transit_reader.hpp index b6525e6eb4..0161b5b2dd 100644 --- a/map/transit/transit_reader.hpp +++ b/map/transit/transit_reader.hpp @@ -148,4 +148,5 @@ private: bool m_isSchemeMode = false; bool m_isSchemeModeBlocked = false; pair<ScreenBase, bool> m_currentModelView = {ScreenBase(), false /* initialized */}; + bool m_trackFirstSchemeData = false; }; |