Skip to content

Commit

Permalink
refactor(TripMonitorNotification): Remove the initial reminder text a…
Browse files Browse the repository at this point in the history
…bout "We'll let you know..."
  • Loading branch information
binh-dam-ibigroup committed Nov 29, 2023
1 parent 27efbf4 commit d3e9b9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,12 @@ public static TripMonitorNotification createItineraryNotFoundNotification(
* Creates an initial reminder of the itinerary monitoring.
*/
public static TripMonitorNotification createInitialReminderNotification(
MonitoredTrip trip,
boolean noOtherNotifications
MonitoredTrip trip
) {
// TODO: i18n.
StringBuilder body = new StringBuilder();
body.append(String.format("Reminder for %s at %s.", trip.tripName, trip.tripTime));
if (noOtherNotifications) {
body.append("\n");
body.append("We will notify you know if anything changes.");
}
return new TripMonitorNotification(
NotificationType.INITIAL_REMINDER,
body.toString()
String.format("Reminder for %s at %s.", trip.tripName, trip.tripTime)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private void addInitialReminderIfNeeded() {

if (!trip.isInactive() && isFirstTimeCheckWithinLeadMonitoringTime && userWantsInitialReminder) {
enqueueNotification(
TripMonitorNotification.createInitialReminderNotification(trip, notifications.isEmpty())
TripMonitorNotification.createInitialReminderNotification(trip)
);
}
}
Expand Down

0 comments on commit d3e9b9f

Please sign in to comment.