Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mobile): null check on null value on top app bar #6406

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

alextran1502
Copy link
Contributor

@alextran1502 alextran1502 commented Jan 15, 2024

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

Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6095c4b
Status: ✅  Deploy successful!
Preview URL: https://2d2a096a.immich.pages.dev
Branch Preview URL: https://mobile-fix-null-check-appbar.immich.pages.dev

View logs

@alextran1502 alextran1502 enabled auto-merge (squash) January 15, 2024 20:43
@@ -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 &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good catch. We don't need to check if the asset's remoteId is null though. So the following should be enough

final comments = album?.remoteId != null ? <provider> : 0

@alextran1502 alextran1502 merged commit 76bad76 into main Jan 16, 2024
22 of 23 checks passed
@alextran1502 alextran1502 deleted the mobile/fix-null-check-appbar branch January 16, 2024 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants