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

[mob][photos] Implement deep linking for public links #3386

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

AmanRajSinghMourya
Copy link
Contributor

Description

Opening an Ente photos public link in the app if the app is installed in phone.

mobile/lib/services/collections_service.dart Outdated Show resolved Hide resolved
mobile/lib/services/collections_service.dart Outdated Show resolved Hide resolved
mobile/lib/services/collections_service.dart Show resolved Hide resolved
mobile/lib/services/collections_service.dart Outdated Show resolved Hide resolved
mobile/lib/ui/tabs/home_widget.dart Outdated Show resolved Hide resolved
mobile/lib/ui/tabs/home_widget.dart Outdated Show resolved Hide resolved
mobile/lib/ui/tabs/home_widget.dart Outdated Show resolved Hide resolved
mobile/lib/ui/tabs/home_widget.dart Outdated Show resolved Hide resolved

CollectionPage(
this.c, {
this.tagPrefix = "collection",
this.hasVerifiedLock = false,
this.isFromCollectPhotos = false,
Key? key,
this.isFromPublicShareLink = false,
this.sharedLinkFiles = const [],
Copy link
Member

Choose a reason for hiding this comment

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

I feel it's better to make this nullable and null be its default value. So that it can be easily identified if sharedLinkFiles was passed (non-null) or not (null).

If we use an empty list by default, it would be hard to know if the link has no files or if a sharedLinkFiles was never passed. In the future the need to know this might arise.

We can also add an assert that if isFromPublicShareLink == true, sharedLinkFiles cannot be null.

https://dart.dev/language/error-handling#assert

@ashilkn ashilkn marked this pull request as ready for review October 24, 2024 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants