mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Fix favorite toggle from playerBottomSheet
This commit is contained in:
parent
0e41cc20bd
commit
46383b985d
1 changed files with 8 additions and 2 deletions
|
|
@ -37,8 +37,14 @@ public class PlayerBottomSheetViewModel extends AndroidViewModel {
|
|||
|
||||
public void setFavorite() {
|
||||
Song song = MusicPlayerRemote.getCurrentSong();
|
||||
song.setFavorite(!song.isFavorite());
|
||||
// songRepository.setFavoriteStatus(song);
|
||||
|
||||
if (song.isFavorite()) {
|
||||
songRepository.unstar(song.getId());
|
||||
song.setFavorite(false);
|
||||
} else {
|
||||
songRepository.star(song.getId());
|
||||
song.setFavorite(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void orderSongAfterSwap(List<Song> songs) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue