From 7dd956a34de3e306166e2ab789c9c346dd90c7ed Mon Sep 17 00:00:00 2001 From: Bruno D'Luka Date: Tue, 23 Apr 2024 18:39:45 -0300 Subject: [PATCH] feat: Use "Unknown" when resolution is not found --- lib/screens/layouts/desktop/device_info_dialog.dart | 8 ++++++-- lib/screens/layouts/desktop/stream_data.dart | 5 ++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/screens/layouts/desktop/device_info_dialog.dart b/lib/screens/layouts/desktop/device_info_dialog.dart index cc76d7fb..d2ba4580 100644 --- a/lib/screens/layouts/desktop/device_info_dialog.dart +++ b/lib/screens/layouts/desktop/device_info_dialog.dart @@ -63,8 +63,12 @@ class _DeviceInfoDialogState extends State { ), ), _buildInfoTile(loc.uri, widget.device.uri), - _buildInfoTile(loc.resolution, - '${widget.device.resolutionX}x${widget.device.resolutionY}'), + _buildInfoTile( + loc.resolution, + '${widget.device.resolutionX ?? '${loc.unknown} '}' + 'x' + '${widget.device.resolutionY ?? ' ${loc.unknown}'}', + ), _buildInfoTile( loc.isPtzSupported, widget.device.hasPTZ ? loc.yes : loc.no), _buildInfoTileWidget( diff --git a/lib/screens/layouts/desktop/stream_data.dart b/lib/screens/layouts/desktop/stream_data.dart index f7f0c65b..b49a4f70 100644 --- a/lib/screens/layouts/desktop/stream_data.dart +++ b/lib/screens/layouts/desktop/stream_data.dart @@ -112,9 +112,8 @@ class _StreamDataState extends State { const borderSize = 4.0; - //This, basically, would - // contain all the information about this stream - and provide - // more options, such as adding/changing overlays. + // This, basically, would contain all the information about this stream - + // and provide more options, such as adding/changing overlays. return AlertDialog( title: RichText( text: TextSpan(