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:
authorMaxim Pimenov <m@maps.me>2016-02-03 18:12:38 +0300
committerMaxim Pimenov <m@maps.me>2016-02-03 18:14:25 +0300
commit110919fc04803ac0860b8a366506ec084fb9e4ca (patch)
tree035df7b200f8b7099c2eb817080ef01595b9828d /search/result.cpp
parent6d52e521bc87fede597d7d89d40a32f98d3af74d (diff)
[search] Added an event that identifies which search result was chosen.
This commit introduces a new Alohalytics event key: "searchShowResult".
Diffstat (limited to 'search/result.cpp')
-rw-r--r--search/result.cpp42
1 files changed, 23 insertions, 19 deletions
diff --git a/search/result.cpp b/search/result.cpp
index 922f9a3f28..771e1491f8 100644
--- a/search/result.cpp
+++ b/search/result.cpp
@@ -14,44 +14,48 @@ Result::Result(FeatureID const & id, m2::PointD const & pt, string const & str,
, m_type(type)
, m_featureType(featureType)
, m_metadata(meta)
+ , m_positionInResults(-1)
{
Init(true /* metadataInitialized */);
}
Result::Result(FeatureID const & id, m2::PointD const & pt, string const & str, string const & type)
- : m_id(id)
- , m_center(pt)
- , m_str(str)
- , m_type(type)
+ : m_id(id), m_center(pt), m_str(str), m_type(type), m_positionInResults(-1)
{
Init(false /* metadataInitialized */);
}
-void Result::Init(bool metadataInitialized)
+Result::Result(m2::PointD const & pt, string const & str, string const & region,
+ string const & type)
+ : m_center(pt), m_str(str), m_region(region), m_type(type), m_positionInResults(-1)
{
- // Features with empty names can be found after suggestion.
- if (m_str.empty())
- m_str = m_type;
-
- m_metadata.m_isInitialized = metadataInitialized;
}
-Result::Result(m2::PointD const & pt, string const & str,
- string const & region, string const & type)
- : m_center(pt), m_str(str), m_region(region), m_type(type)
+Result::Result(string const & str, string const & suggest)
+ : m_str(str), m_suggestionStr(suggest), m_positionInResults(-1)
{
}
-Result::Result(string const & str, string const & suggest)
- : m_str(str), m_suggestionStr(suggest)
+Result::Result(Result const & res, string const & suggest)
+ : m_id(res.m_id)
+ , m_center(res.m_center)
+ , m_str(res.m_str)
+ , m_region(res.m_region)
+ , m_type(res.m_type)
+ , m_featureType(res.m_featureType)
+ , m_suggestionStr(suggest)
+ , m_hightlightRanges(res.m_hightlightRanges)
+ , m_positionInResults(-1)
{
}
-Result::Result(Result const & res, string const & suggest)
- : m_id(res.m_id), m_center(res.m_center), m_str(res.m_str),
- m_region(res.m_region), m_type(res.m_type), m_featureType(res.m_featureType),
- m_suggestionStr(suggest), m_hightlightRanges(res.m_hightlightRanges)
+void Result::Init(bool metadataInitialized)
{
+ // Features with empty names can be found after suggestion.
+ if (m_str.empty())
+ m_str = m_type;
+
+ m_metadata.m_isInitialized = metadataInitialized;
}
Result::ResultType Result::GetResultType() const