Skip to content

Commit

Permalink
Use old calculation of city visits in right sidebar on Map page due t…
Browse files Browse the repository at this point in the history
…o performance issues
  • Loading branch information
Freika committed Jun 25, 2024
1 parent dc67369 commit ad164b0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Changed

- Calculation of city visits that are shown in right sidebar on Map page was reworked and now is more accurate.
- Order of points on Points page is now descending by timestamp instead of ascending.

---
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/map_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class MapController < ApplicationController
def index
@points = current_user.tracked_points.without_raw_data.where('timestamp >= ? AND timestamp <= ?', start_at, end_at).order(timestamp: :asc)

@countries_and_cities = Visits::Calculate.new(@points).uniq_visits
@countries_and_cities = CountriesAndCities.new(@points).call
@coordinates =
@points.pluck(:latitude, :longitude, :battery, :altitude, :timestamp, :velocity, :id)
.map { [_1.to_f, _2.to_f, _3.to_s, _4.to_s, _5.to_s, _6.to_s, _7] }
Expand Down

0 comments on commit ad164b0

Please sign in to comment.