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

Ensure Terms of Service Link Opens Correctly #187

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

teogor
Copy link
Owner

@teogor teogor commented Mar 5, 2024

Fix: Use Correct Link for Terms of Service Option

This pull request resolves an issue where the Terms of Service option was mistakenly opening the Privacy Policy link. The fix ensures the correct link is used.

Problem:

Previously, the termsOfServiceOption() function was incorrectly using applicationDetails.privacyLink?.let { ... } to open the Terms of Service page. This led users to the Privacy Policy instead.

Solution:

The code has been updated to use the correct property, applicationDetails.termsLink?.let { ... }, to ensure the Terms of Service page is opened as intended.

Code Change:

fun ScreenListScope.termsOfServiceOption() = item {
  val uriHandler = LocalUriHandler.current
  val applicationDetails = LocalApplicationDetails.current
  SimpleView(
    title = Resources.TermsOfService,
    subtitle = Resources.ReviewOurTermsOfService,
    icon = Icons.Default.Link,
    clickable = {
      applicationDetails.termsLink?.let {  // Corrected link property
        uriHandler.openUri(it)
      }
    },
  )
}

@teogor teogor added the @bug-fix label Mar 5, 2024
@teogor teogor added this to the 1.0.0-alpha05 milestone Mar 5, 2024
@teogor teogor self-assigned this Mar 5, 2024
@teogor teogor merged commit 48576bb into main Mar 5, 2024
5 checks passed
@zeobot zeobot bot deleted the bug-fix/terms-of-service-option branch March 5, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

1 participant