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

GoogleMap(): non-nullable indoorStateChangeListener parameter is inconsistent with other listener parameters #479

Closed
bubenheimer opened this issue Dec 16, 2023 · 2 comments
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@bubenheimer
Copy link
Contributor

bubenheimer commented Dec 16, 2023

android-maps-compose 4.3.0

The GoogleMap() IndoorStateChangeListener parameter currently uses DefaultIndoorStateChangeListener as a default value instead of null. This is inconsistent with all other map listener callback parameters that were changed to default to null in #320.

I propose making this parameter nullable and using a null default, as well as removing the DefaultIndoorStateChangeListener object, which is no longer useful. This is an API-breaking change.

@bubenheimer bubenheimer added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Dec 16, 2023
@bubenheimer
Copy link
Contributor Author

I will make a PR after #478 is merged. The two changes overlap.

@bubenheimer bubenheimer changed the title GoogleMap(): make IndoorStateChangeListener parameter nullable instead of using DefaultIndoorStateChangeListener as a default parameter GoogleMap(): non-nullable indoorStateChangeListener parameter is inconsistent with other listener parameters Dec 16, 2023
@bubenheimer
Copy link
Contributor Author

I've changed my mind on this subject. I no longer think this should be changed: the IndoorStateChangeListener must always remain set on the GoogleMap SDK, because of its special semantics where setting it twice is not possible.

The current API reflects well the semantics that the IndoorStateChangeListener is always set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant