forked from organicmaps/organicmaps-tmp
[omim] Review fixes.
This commit is contained in:
parent
c72107e00f
commit
d095c16b4f
4 changed files with 4 additions and 6 deletions
|
@ -148,12 +148,12 @@ void initFieldsMap()
|
|||
case MWMPlacePageCellTypeCoordinate:
|
||||
return [self coordinate];
|
||||
case MWMPlacePageCellTypeAddPlaceButton:
|
||||
return m_info.IsLongTap() ? @"" : nil;
|
||||
return m_info.ShouldShowAddPlace() && isNewMWM ? @"" : nil;
|
||||
case MWMPlacePageCellTypeBookmark:
|
||||
return m_info.IsBookmark() ? @"" : nil;
|
||||
case MWMPlacePageCellTypeEditButton:
|
||||
// TODO(Vlad): It's a really strange way to "display" cell if returned text is not nil.
|
||||
return isNewMWM && !m_info.IsMyPosition() && !m_info.GetSubtitle().empty() ? @"": nil;
|
||||
return isNewMWM && !m_info.IsMyPosition() && m_info.IsFeature() ? @"": nil;
|
||||
case MWMPlacePageCellTypeAddBusinessButton:
|
||||
return m_info.IsBuilding() ? @"" : nil;
|
||||
default:
|
||||
|
|
|
@ -1891,7 +1891,6 @@ void Framework::OnTapEvent(df::TapInfo const & tapInfo)
|
|||
df::SelectionShape::ESelectedObject const selection = OnTapEventImpl(tapInfo, info);
|
||||
if (selection != df::SelectionShape::OBJECT_EMPTY)
|
||||
{
|
||||
info.m_isLongTap = tapInfo.m_isLong;
|
||||
// Back up last tap event to recover selection in case of Drape reinitialization.
|
||||
m_lastTapEvent.reset(new df::TapInfo(tapInfo));
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ bool Info::IsMyPosition() const { return m_isMyPosition; }
|
|||
bool Info::HasApiUrl() const { return !m_apiUrl.empty(); }
|
||||
bool Info::IsEditable() const { return m_isEditable; }
|
||||
bool Info::HasWifi() const { return GetInternet() == osm::Internet::Wlan; }
|
||||
bool Info::IsLongTap() const { return m_isLongTap; }
|
||||
bool Info::ShouldShowAddPlace() const { return !IsFeature() || (!IsPointType() && !IsBuilding()); }
|
||||
|
||||
string Info::FormatNewBookmarkName() const
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
bool IsFeature() const;
|
||||
bool IsBookmark() const;
|
||||
bool IsMyPosition() const;
|
||||
bool IsLongTap() const;
|
||||
bool ShouldShowAddPlace() const;
|
||||
/// @returns true if Back API button should be displayed.
|
||||
bool HasApiUrl() const;
|
||||
/// @returns true if Edit Place button should be displayed.
|
||||
|
@ -65,7 +65,6 @@ public:
|
|||
|
||||
bool m_isMyPosition = false;
|
||||
bool m_isEditable = false;
|
||||
bool m_isLongTap = false;
|
||||
|
||||
// TODO(AlexZ): Temporary solution. It's better to use a wifi icon in UI instead of text.
|
||||
string m_localizedWifiString;
|
||||
|
|
Loading…
Add table
Reference in a new issue