Skip to content

Commit

Permalink
Fixed RP playlist song order & added option for deletion #179
Browse files Browse the repository at this point in the history
  • Loading branch information
anandnet committed Apr 6, 2024
1 parent 5fccc87 commit 76209f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/ui/screens/PlaylistNAlbum/playlistnalbum_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,7 @@ class PlaylistNAlbumScreen extends StatelessWidget {
content.playlistId !=
"SongDownloads" &&
content.playlistId != "SongsCache",
isSongDeletetioFeatureRequired:
content.playlistId != "LIBRP",
isSongDeletetioFeatureRequired: true,
onSort: (type, ascending) {
playListNAlbumScreenController.onSort(
type, ascending);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ class PlayListNAlbumScreenController extends GetxController {

Future<void> fetchSongsfromDatabase(id) async {
box = await Hive.openBox(id);
songList.value = box.values
final List<MediaItem> songList_ = box.values
.map<MediaItem?>((item) => MediaItemBuilder.fromJson(item))
.whereType<MediaItem>()
.toList();
songList.value = id == "LIBRP" ? songList_.reversed.toList() : songList_;
isContentFetched.value = true;
checkDownloadStatus();
}
Expand Down Expand Up @@ -312,7 +313,7 @@ class PlayListNAlbumScreenController extends GetxController {

songList.removeWhere((song) => song.id == element.id);
}
if (!isoffline) await box_.close();
if (!isoffline) await box_.close();
}

List<MediaItem> selectedSongs() {
Expand Down

0 comments on commit 76209f2

Please sign in to comment.