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

Fix [Android] CollectionView EmptyView SelectionMode=Single on Android #9215

Merged
merged 3 commits into from
Aug 11, 2022
Merged

Fix [Android] CollectionView EmptyView SelectionMode=Single on Android #9215

merged 3 commits into from
Aug 11, 2022

Conversation

yurkinh
Copy link
Contributor

@yurkinh yurkinh commented Aug 5, 2022

Description of Change

If an empty view is used in a collection view with a single selection mode and there is no Item in the list on startup the app crashes on Android. Works fine on ios/Windows.

Fixes #9060

@ghost ghost added the community ✨ Community Contribution label Aug 5, 2022
@ghost
Copy link

ghost commented Aug 5, 2022

Hey there @yurkinh! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

1 similar comment
@ghost

This comment was marked as duplicate.

@jfversluis
Copy link
Member

jfversluis commented Aug 5, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@jfversluis jfversluis added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label Aug 5, 2022
@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@rmarinho rmarinho self-requested a review August 8, 2022 12:09
@rmarinho
Copy link
Member

rmarinho commented Aug 8, 2022

We cold just check on line 16 and return there if it's null, so no other code will run if there's no adapter

@rmarinho
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@yurkinh yurkinh requested a review from salarcode August 11, 2022 06:55
@salarcode
Copy link
Contributor

@yurkinh there has been a misunderstanding I'm not a reviewer, I think someone else should review this. Although everything seems good to me :-)

@rmarinho rmarinho merged commit 0c5a570 into dotnet:net6.0 Aug 11, 2022
@yurkinh yurkinh deleted the fix-9060 branch August 11, 2022 11:23
PureWeen pushed a commit that referenced this pull request Aug 11, 2022
#9215) Fixes #9060

* Fixed null reference when we have EmptyView and SelectionMode = signle

* Moved null check out of loop

* Moved adapter null check to the begging of the method
@Redth Redth added this to the 7.0-rc2 milestone Oct 4, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView community ✨ Community Contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants