MrStahlfelge / gdx-gamesvcs

Easy integration of gameservices in your libGDX game: Google Play Games, Apple Game Center, Amazon GameCircle and more
Apache License 2.0
113 stars 20 forks source link

Change fetchLeaderboardEntriesSync to public #52

Closed GadWissberg closed 1 year ago

GadWissberg commented 1 year ago

Hello! In my game I fetch several leaderboards entries at once and I want to fetch them one by one sync. Once they are fetched, I show the relevant UI for all of them at once. I saw only the async is public and the sync in private, so I wonder if this could be merged. Thanks in advance

MrStahlfelge commented 1 year ago

I get that the change would come in handy for your special needs, but it would expose internal implementation details of GpgsClient to the outside. If you use it, your code will break the moment you use other game service implementations or the implementation of GpgsClient will change. Although it is code that is always a bit hard to look at, I would recommend you to implement a call-chain where the next chain entry will get called from the callback of the former one.

GadWissberg commented 1 year ago

Alright thanks :)