diff --git a/drape_frontend/my_position.cpp b/drape_frontend/my_position.cpp index 57d06d40fb..3a9ebf51d8 100644 --- a/drape_frontend/my_position.cpp +++ b/drape_frontend/my_position.cpp @@ -13,7 +13,6 @@ #include "drape/overlay_handle.hpp" #include "drape/render_bucket.hpp" -#include "indexer/map_style_reader.hpp" namespace df { @@ -60,7 +59,6 @@ MyPosition::MyPosition(ref_ptr context, ref_ptrSetPositionObsolete(obsolete); } diff --git a/drape_frontend/my_position.hpp b/drape_frontend/my_position.hpp index baee720980..0408e910ed 100644 --- a/drape_frontend/my_position.hpp +++ b/drape_frontend/my_position.hpp @@ -3,7 +3,6 @@ #include "drape_frontend/arrow3d.hpp" #include "drape_frontend/frame_values.hpp" #include "drape_frontend/render_node.hpp" -#include "drape_frontend/render_state_extension.hpp" #include "shaders/program_manager.hpp" @@ -63,7 +62,6 @@ private: float m_accuracy; bool m_showAzimuth; bool m_isRoutingMode; - bool m_obsoletePosition; using TPart = std::pair; diff --git a/drape_frontend/my_position_controller.cpp b/drape_frontend/my_position_controller.cpp index 3522ff20ee..bf21f8b382 100644 --- a/drape_frontend/my_position_controller.cpp +++ b/drape_frontend/my_position_controller.cpp @@ -7,21 +7,17 @@ #include "drape_frontend/user_event_stream.hpp" #include "drape_frontend/visual_params.hpp" -#include "indexer/scales.hpp" - #include "geometry/mercator.hpp" -#include "base/math.hpp" - #include "platform/measurement_utils.hpp" +#include "base/math.hpp" #include #include #include #include #include -#include namespace df { @@ -433,18 +429,10 @@ void MyPositionController::OnLocationUpdate(location::GpsInfo const & info, bool m_isDirtyViewport = true; } - using namespace std::chrono; - auto const delta = - duration_cast(system_clock::now().time_since_epoch()).count() - info.m_timestamp; - if (delta >= kMaxUpdateLocationInvervalSec) - { - m_positionIsObsolete = true; - m_autoScale2d = m_autoScale3d = kUnknownAutoZoom; - } - else - { - m_positionIsObsolete = false; - } + // Assume that every new position is fresh enough. We can't make some straightforward filtering here + // like comparing system_clock::now().time_since_epoch() and info.m_timestamp, because can't rely + // on valid time settings on endpoint device. + m_positionIsObsolete = false; if (!m_isPositionAssigned) {