Skip to content

Commit

Permalink
Merge pull request #790 from shankari/fix_long_load_when_no_to_label
Browse files Browse the repository at this point in the history
Change the delete delay to 30 sec + add day of the week for clarity
  • Loading branch information
shankari committed Aug 18, 2021
2 parents 356cb30 + a4b5ad2 commit b97d9d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions www/js/diary/infinite_scroll_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,14 +372,14 @@ angular.module('emission.main.diary.infscrolllist',['ui-leaflet',
// is going to modify it further
trip.waitingForMod = true;
let currTimeoutPromise = trip.timeoutPromise;
let ONE_MINUTE = 60 * 1000;
let THIRTY_SECS = 30 * 1000;
Logger.log("trip starting at "+trip.start_fmt_time+": creating new timeout");
trip.timeoutPromise = $timeout(function() {
Logger.log("trip starting at "+trip.start_fmt_time+": executing recompute");
trip.waitingForMod = false;
trip.timeoutPromise = undefined;
$scope.recomputeDisplayTrips();
}, ONE_MINUTE);
}, THIRTY_SECS);
Logger.log("trip starting at "+trip.start_fmt_time+": cancelling existing timeout "+currTimeoutPromise);
$timeout.cancel(currTimeoutPromise);
}
Expand Down Expand Up @@ -476,7 +476,7 @@ angular.module('emission.main.diary.infscrolllist',['ui-leaflet',
tripgj.display_start_time = DiaryHelper.getLocalTimeString(tripgj.start_local_dt);
tripgj.display_end_time = DiaryHelper.getLocalTimeString(tripgj.end_local_dt);
tripgj.display_distance = $scope.getFormattedDistanceInMiles(tripgj.distance);
tripgj.display_date = moment(tripgj.start_ts * 1000).format('DD MMM YY');
tripgj.display_date = moment(tripgj.start_ts * 1000).format('ddd DD MMM YY');
tripgj.display_time = $scope.getFormattedTimeRange(tripgj.start_ts,
tripgj.end_ts);
tripgj.background = "bg-light";
Expand Down

0 comments on commit b97d9d7

Please sign in to comment.