Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch the trip confirm screen to also go to the diary directly #754

Merged
merged 1 commit into from
Apr 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions www/js/diary/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,12 @@ angular.module('emission.main.diary.list',['ui-leaflet',
$scope.populateBasicClasses(tripgj);
$scope.populateCommonInfo(tripgj);
});
$ionicScrollDelegate.scrollTop(true);
if ($rootScope.displayingIncident) {
$ionicScrollDelegate.scrollBottom(true);
$rootScope.displayingIncident = false;
} else {
$ionicScrollDelegate.scrollTop(true);
}
});
});

Expand Down Expand Up @@ -610,7 +615,6 @@ angular.module('emission.main.diary.list',['ui-leaflet',
} else {
Logger.log("currDay is not defined, load not complete");
}
$rootScope.displayingIncident = false;
}
});
});
Expand Down
6 changes: 2 additions & 4 deletions www/js/splash/startprefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,9 @@ angular.module('emission.splash.startprefs', ['emission.plugin.logger',
var temp = ReferralHandler.getReferralNavigation();
if (temp == 'goals') {
return {state: 'root.main.goals', params: {}};
} else if ($rootScope.tripConfirmParams) {
} else if ($rootScope.displayingIncident) {
logger.log("Showing tripconfirm from startprefs");
var startEndParams = $rootScope.tripConfirmParams;
$rootScope.tripConfirmParams = angular.undefined;
return {state: 'root.main.tripconfirm', params: startEndParams};
return {state: 'root.main.diary'};
} else if (angular.isDefined($rootScope.redirectTo)) {
var redirState = $rootScope.redirectTo;
$rootScope.redirectTo = undefined;
Expand Down
5 changes: 5 additions & 0 deletions www/js/tripconfirm/post-trip-prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,15 @@ angular.module('emission.tripconfirm.posttrip.prompt', ['emission.plugin.logger'
};

var displayCompletedTrip = function(notification, eventOpts) {
/*
$rootScope.tripConfirmParams = notification.data;
Logger.log("About to display completed trip from notification "+
JSON.stringify(notification.data));
$state.go("root.main.tripconfirm", notification.data);
*/
Logger.log("About to go to diary, which now displays draft information");
$rootScope.displayingIncident = true;
$state.go("root.main.diary");
};

var checkCategory = function(notification) {
Expand Down