Skip to content

fix: Null check for ticket url #2229

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

Merged
merged 1 commit into from
Aug 4, 2019
Merged

Conversation

liveHarshit
Copy link
Member

Fixes #2228

@auto-label auto-label bot added the fix label Aug 3, 2019
nikit19
nikit19 previously approved these changes Aug 4, 2019
!ticketUrl.isNullOrEmpty()) {
Utils.openUrl(requireContext(), ticketUrl)
} else {
loadTicketFragment()
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can just turn if (Uri.parse(ticketUrl).host != getString(R.string.FRONTEND_HOST) && !ticketUrl.isNullOrEmpty()) to if (!ticketUrl.isNullOrEmpty() && Uri.parse(ticketUrl).host != getString(R.string.FRONTEND_HOST))

Copy link
Member Author

Choose a reason for hiding this comment

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

if (!ticketUrl.isNullOrEmpty() && Uri.parse(ticketUrl).host != getString(R.string.FRONTEND_HOST))

Oh, it's good if that works. Will check 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes working. Updated 👍

@iamareebjamal iamareebjamal merged commit ae717a6 into fossasia:development Aug 4, 2019
@liveHarshit liveHarshit deleted the 2228 branch August 4, 2019 12:14
liveHarshit added a commit to liveHarshit/open-event-attendee-android that referenced this pull request Aug 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

App crashes on clicking tickets in event details
4 participants