From e163ed7463e93e87ea46c50779b1c729fdfe9ce3 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Fri, 15 Jan 2016 11:38:49 -0800 Subject: [PATCH] Update recent entry detail when recent entry changes. This doesn't feel like the right implementation, but I'm feeling impatient today... --- firmware/application/ais_app.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/firmware/application/ais_app.cpp b/firmware/application/ais_app.cpp index 9f90012b..8c1da60b 100644 --- a/firmware/application/ais_app.cpp +++ b/firmware/application/ais_app.cpp @@ -382,8 +382,13 @@ void AISAppView::set_parent_rect(const Rect new_parent_rect) { void AISAppView::on_packet(const ais::Packet& packet) { logger.on_packet(packet); - recent.on_packet(packet); + const auto updated_entry = recent.on_packet(packet); recent_entries_view.set_dirty(); + + // TODO: Crude hack, should be a more formal listener arrangement... + if( updated_entry.mmsi == recent_entry_detail_view.entry().mmsi ) { + recent_entry_detail_view.set_entry(updated_entry); + } } void AISAppView::on_show_list() {