Fix crashing, loading albums

This commit is contained in:
h4h13 2019-09-18 01:06:13 +05:30
parent 397f42a54a
commit d7ab358e60
59 changed files with 370 additions and 405 deletions

View file

@ -49,7 +49,6 @@ object MusicPlayerRemote {
} else song.id == currentSong.id
}
val currentSong: Song
get() = if (musicService != null) {
musicService!!.currentSong
@ -219,7 +218,7 @@ object MusicPlayerRemote {
*/
fun openAndShuffleQueue(queue: ArrayList<Song>, startPlaying: Boolean) {
var startPosition = 0
if (!queue.isEmpty()) {
if (queue.isNotEmpty()) {
startPosition = Random().nextInt(queue.size)
}