mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
Fix crash in shops
This commit is contained in:
parent
36ccb21bb6
commit
95c9590be4
3 changed files with 5 additions and 8 deletions
|
|
@ -155,7 +155,7 @@ android {
|
|||
multiDexEnabled true
|
||||
resConfigs "en", "bg", "de", "en-rGB", "es", "fr", "hr-rHR", "in", "it", "iw", "ja", "ko", "lt", "nl", "pl", "pt-rBR", "pt-rPT", "ru", "tr", "zh", "zh-rTW"
|
||||
|
||||
versionCode 2388
|
||||
versionCode 2390
|
||||
versionName "2.5"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.habitrpg.android.habitica.models.AvatarPreferences
|
|||
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import java.util.*
|
||||
|
||||
open class Preferences : RealmObject(), AvatarPreferences {
|
||||
|
||||
|
|
@ -121,6 +122,6 @@ open class Preferences : RealmObject(), AvatarPreferences {
|
|||
}
|
||||
|
||||
fun hasTaskBasedAllocation(): Boolean {
|
||||
return allocationMode?.toLowerCase() == "taskbased" && automaticAllocation
|
||||
return allocationMode?.toLowerCase(Locale.ROOT) == "taskbased" && automaticAllocation
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,17 @@
|
|||
package com.habitrpg.android.habitica.ui.viewHolders
|
||||
|
||||
import android.content.Context
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import android.view.View
|
||||
import android.widget.AdapterView
|
||||
import android.widget.ArrayAdapter
|
||||
import android.widget.Button
|
||||
import android.widget.Spinner
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.databinding.CustomizationSectionHeaderBinding
|
||||
import com.habitrpg.android.habitica.ui.helpers.bindView
|
||||
|
||||
class SectionViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
|
||||
private val binding = CustomizationSectionHeaderBinding.bind(itemView)
|
||||
private val label: TextView by bindView(itemView, R.id.label)
|
||||
private val selectionSpinner: Spinner? by bindView(itemView, R.id.classSelectionSpinner)
|
||||
internal val notesView: TextView? by bindView(itemView, R.id.headerNotesView)
|
||||
|
|
@ -23,7 +20,7 @@ class SectionViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
|||
var spinnerSelectionChanged: (() -> Unit)? = null
|
||||
|
||||
init {
|
||||
binding.purchaseSetButton.visibility = View.GONE
|
||||
itemView.findViewById<View?>(R.id.purchaseSetButton)?.visibility = View.GONE
|
||||
selectionSpinner?.onItemSelectedListener = object: AdapterView.OnItemSelectedListener {
|
||||
override fun onNothingSelected(parent: AdapterView<*>?) {
|
||||
spinnerSelectionChanged?.invoke()
|
||||
|
|
@ -33,7 +30,6 @@ class SectionViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
|||
spinnerSelectionChanged?.invoke()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun bind(title: String) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue