fix showing customizations

This commit is contained in:
Phillip Thelen 2023-09-04 14:54:47 +02:00
parent 76153d7f06
commit 4ebf99117e

View file

@ -52,7 +52,7 @@ open class Customization : RealmObject(), BaseObject {
fun getImageName(userSize: String?, hairColor: String?): String? { fun getImageName(userSize: String?, hairColor: String?): String? {
if (identifier?.isNotBlank() != true || identifier == "none" || identifier == "0") return null if (identifier?.isNotBlank() != true || identifier == "none" || identifier == "0") return null
when (type) { return when (type) {
"skin" -> return "skin_$identifier" "skin" -> return "skin_$identifier"
"shirt" -> return userSize + "_shirt_" + identifier "shirt" -> return userSize + "_shirt_" + identifier
"hair" -> { "hair" -> {
@ -64,8 +64,8 @@ open class Customization : RealmObject(), BaseObject {
} }
"background" -> return "background_$identifier" "background" -> return "background_$identifier"
"chair" -> return "chair_$identifier" "chair" -> return "chair_$identifier"
else -> null
} }
return null
} }
fun isUsable(purchased: Boolean): Boolean { fun isUsable(purchased: Boolean): Boolean {