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

Feature rating sites #112

Closed
wants to merge 4 commits into from
Closed

Feature rating sites #112

wants to merge 4 commits into from

Conversation

hadi-norouzi
Copy link
Collaborator

@hadi-norouzi hadi-norouzi commented Sep 2, 2024

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly.

Take a look at the contributing guidelines for this project.

Description

Checklist

  • Make sure to open a GitHub issue as a bug/feature request before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the linter (code style) passes
  • Appropriate docs were updated (if necessary)

Fixes #109

icon = R.drawable.ic_imdb,
rate = "${rate.rating}",
votes = ratings.imdb?.votes ?: "N/A",
onClick = rate.link?.let { { onRatingClick(rate.link!!) } },
Copy link
Owner

Choose a reason for hiding this comment

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

  1. Why do not we handle the link click and hoist this url to parent composable while we can sort it out here?
  2. Please try to avoid using !! as much as possible. Although in this case rate.link!! will never be null, it takes time for someone reading the code to understand why. They might need to verify whether a null case is possible and if an exception could be thrown. Using a safer approach can make the code more readable and maintainable.
Suggested change
onClick = rate.link?.let { { onRatingClick(rate.link!!) } },
onClick = rate.link?.let { { onRatingClick(it) } },

@moallemi moallemi closed this Sep 23, 2024
@moallemi moallemi deleted the feature/rating_sites branch September 23, 2024 04:05
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.

[FR]: Click on Rating in Movie/Show it opens associated website
2 participants