fix: correct inverted logic in makeExpertCall function#339
Open
navaneeth0041 wants to merge 1 commit intoAOSSIE-Org:developfrom
Open
fix: correct inverted logic in makeExpertCall function#339navaneeth0041 wants to merge 1 commit intoAOSSIE-Org:developfrom
navaneeth0041 wants to merge 1 commit intoAOSSIE-Org:developfrom
Conversation
Contributor
Author
|
@AyaNady17 @mdmohsin7 Can u review this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request addresses a bug in the makeExpertCall function within the LocalExpert feature. The bug was caused by inverted conditional logic, which resulted in displaying an alert dialog instead of launching the phone dialer when users attempted to call an expert.
🛠️ Fix Summary:
Corrected the logic by checking await canLaunchUrl(phoneUri) instead of its negation.
Added a context.mounted check before attempting to show the alert dialog to prevent runtime issues.
Ensured consistent use of the existing showAlertDialog utility.
This fix improves the user experience by ensuring the phone dialer opens as expected when tapping the call icon.
Fixes #338
Type of change
How Has This Been Tested?
WhatsApp.Video.2025-04-07.at.00.02.24.mp4
Checklist:
Maintainer Checklist