From 76bad762d707a5a43f9e33935f525b18450353f4 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 15 Jan 2024 18:25:59 -0600 Subject: [PATCH] fix(mobile): null check on null value on top app bar (#6406) Fixed issue with null check on null value causing the top app bar render a gray overlay when open an asset in Album On Device section in Library page --- mobile/ios/Podfile.lock | 2 +- mobile/lib/modules/asset_viewer/ui/top_control_app_bar.dart | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mobile/ios/Podfile.lock b/mobile/ios/Podfile.lock index 24a209cec2..45f2dc1c52 100644 --- a/mobile/ios/Podfile.lock +++ b/mobile/ios/Podfile.lock @@ -179,4 +179,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 599d8aeb73728400c15364e734525722250a5382 -COCOAPODS: 1.11.3 +COCOAPODS: 1.12.1 diff --git a/mobile/lib/modules/asset_viewer/ui/top_control_app_bar.dart b/mobile/lib/modules/asset_viewer/ui/top_control_app_bar.dart index abdfa427c8..e8444ef8be 100644 --- a/mobile/lib/modules/asset_viewer/ui/top_control_app_bar.dart +++ b/mobile/lib/modules/asset_viewer/ui/top_control_app_bar.dart @@ -39,7 +39,9 @@ class TopControlAppBar extends HookConsumerWidget { const double iconSize = 22.0; final a = ref.watch(assetWatcher(asset)).value ?? asset; final album = ref.watch(currentAlbumProvider); - final comments = album != null + final comments = album != null && + album.remoteId != null && + asset.remoteId != null ? ref.watch(activityStatisticsProvider(album.remoteId!, asset.remoteId)) : 0;