mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-04 16:23:08 +00:00
Fix favorite toggle from playerBottomSheet
This commit is contained in:
@@ -37,8 +37,14 @@ public class PlayerBottomSheetViewModel extends AndroidViewModel {
|
|||||||
|
|
||||||
public void setFavorite() {
|
public void setFavorite() {
|
||||||
Song song = MusicPlayerRemote.getCurrentSong();
|
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) {
|
public void orderSongAfterSwap(List<Song> songs) {
|
||||||
|
|||||||
Reference in New Issue
Block a user