Skip to content

Commit

Permalink
fix: showing multiple alerts
Browse files Browse the repository at this point in the history
Signed-off-by: Amr Hossam <[email protected]>
  • Loading branch information
amrhossamdev authored and aaronbrethorst committed Oct 31, 2024
1 parent e253d6a commit 60862fb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,16 @@ public void processAlerts(List<GtfsRealtime.FeedEntity> alerts, GtfsAlertCallBac
continue;
}
GtfsRealtime.Alert alert = entity.getAlert();
GtfsAlertsHelper.markAlertAsRead(Application.get().getApplicationContext() ,entity);

String id = entity.getId();
String title = GtfsAlertsHelper.getAlertTitle(alert);
String description = GtfsAlertsHelper.getAlertDescription(alert);
String url = GtfsAlertsHelper.getAlertUrl(alert);

Log.d(TAG, "Alert: " + id + " - " + title + " - " + description + " - " + url);
GtfsAlertsHelper.markAlertAsRead(Application.get().getApplicationContext(), entity);
callback.onAlert(title, description, url);
// Only trigger the callback for one alert.
break;
}
}

Expand Down

0 comments on commit 60862fb

Please sign in to comment.