fixed initialization error (no postValue!), last played works again now

remotes/origin/devel
yattoz 2019-12-15 11:03:08 +01:00
parent d1781b908d
commit 931b46c496
1 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,7 @@
package fr.forum_thalie.tsumugi.playerstore
import androidx.lifecycle.MutableLiveData
import fr.forum_thalie.tsumugi.noConnectionValue
class Song(artistTitle: String = "", _id : Int = 0) {
@ -35,9 +36,10 @@ class Song(artistTitle: String = "", _id : Int = 0) {
title.value = data.substring(hyphenPos + 3)
} catch (e: Exception) {
if (artist.value != "")
artist.postValue("")
artist.value = ""
if (title.value != data)
title.postValue(data)
title.value = data
// else : do nothing
}
}