Skip to content

Commit

Permalink
improvement(TripMonitorNotifications): Improve notification text
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup committed Nov 28, 2023
1 parent e8adc1b commit 27efbf4
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ public static TripMonitorNotification createInitialReminderNotification(
MonitoredTrip trip,
boolean noOtherNotifications
) {
// TODO: i18n and add itinerary details.
// TODO: i18n.
StringBuilder body = new StringBuilder();
body.append(String.format("Reminder for your upcoming trip at %s.", trip.tripTime));
body.append(String.format("Reminder for %s at %s.", trip.tripName, trip.tripTime));
if (noOtherNotifications) {
body.append(" ");
body.append("We will let you know if anything changes.");
body.append("\n");
body.append("We will notify you know if anything changes.");
}
return new TripMonitorNotification(
NotificationType.INITIAL_REMINDER,
Expand All @@ -137,15 +137,13 @@ private static String bodyFromAlerts(
}
// If there are any unseen alerts, include list of these.
if (!unseenAlerts.isEmpty()) {
// TODO: Improve message.
body.append("New alerts found! They are:");
body.append("\uD83D\uDD14 New alerts found:\n");
body.append(listFromAlerts(unseenAlerts, false));
}
// If there are any resolved alerts, include list of these.
if (!resolvedAlerts.isEmpty()) {
if (body.length() > 0) body.append("\n");
// TODO: Improve message.
body.append("Resolved alerts are:");
body.append("Resolved alerts:");
body.append(listFromAlerts(resolvedAlerts, true));
}
return body.toString();
Expand Down

0 comments on commit 27efbf4

Please sign in to comment.