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

checkIn gives wrong value for favorite song #9

Closed
Su-desh opened this issue Oct 2, 2021 · 1 comment
Closed

checkIn gives wrong value for favorite song #9

Su-desh opened this issue Oct 2, 2021 · 1 comment
Labels
PRI: Low S: Fixed T: Bug Something isn't working

Comments

@Su-desh
Copy link

Su-desh commented Oct 2, 2021

var songEntity = widget.singleTrack!.getMap.toFavoritesEntity(); bool checkInResult = await audioRoom.checkIn(RoomType.FAVORITES, songEntity.key); if (checkInResult == false) { audioRoom.addTo(RoomType.FAVORITES, songEntity); }
//single track is the songModel

this is the code , in documentation it is written that
(The return will be [true] if song has already been added or [false] if not.)
but then also it gives false and add the the again to favorite list

i tried many times , did not get answer.

Android version 11 .

@LucJosin LucJosin added PRI: Low S: To-Do Feature or request that still need doing T: Bug Something isn't working labels Oct 2, 2021
@LucJosin LucJosin added S: Fixed and removed S: To-Do Feature or request that still need doing labels Oct 2, 2021
@LucJosin
Copy link
Owner

LucJosin commented Oct 2, 2021

Hey @Su-desh. The version 2.2.0 added the ignoreDuplicate parameter to addTo methods. You don't need to use the checkIn. If setted to false, the song will only be added one time.

https://github.com/LucasPJS/on_audio_room/blob/2de17edc3a7665571c093c4a248fded9c368c917/example/lib/main.dart#L123-L127

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PRI: Low S: Fixed T: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants