Filter last heard without callsign info
This commit is contained in:
@@ -59,6 +59,11 @@ class _LastHeardViewState extends State<LastHeardView> {
|
|||||||
final payload = jsonDecode(payloadStr) as Map<String, dynamic>;
|
final payload = jsonDecode(payloadStr) as Map<String, dynamic>;
|
||||||
final item = LastHeardItem.fromJson(payload);
|
final item = LastHeardItem.fromJson(payload);
|
||||||
|
|
||||||
|
// Filter out items without a callsign
|
||||||
|
if (item.sourceCall.isEmpty) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
// Add to the beginning of the list
|
// Add to the beginning of the list
|
||||||
_items.insert(0, item);
|
_items.insert(0, item);
|
||||||
|
|||||||
Reference in New Issue
Block a user