mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-14 02:01:56 +00:00
fix setting a stat on a task
This commit is contained in:
parent
5b840ab5ae
commit
6971793fbe
1 changed files with 1 additions and 13 deletions
|
|
@ -354,18 +354,6 @@ class TaskFormActivity : BaseActivity() {
|
|||
button.setTextColor(ContextCompat.getColor(this, textColorID))
|
||||
}
|
||||
|
||||
private fun getSelectedAttribute(): String {
|
||||
return if (statIntelligenceButton.isSelected) {
|
||||
Stats.INTELLIGENCE
|
||||
} else if (statConstitutionButton.isSelected) {
|
||||
Stats.CONSTITUTION
|
||||
} else if (statPerceptionButton.isSelected) {
|
||||
Stats.PERCEPTION
|
||||
} else {
|
||||
Stats.STRENGTH
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateTagViewsColors() {
|
||||
tagsWrapper.children.forEach { view ->
|
||||
val tagView = view as? AppCompatCheckBox
|
||||
|
|
@ -394,7 +382,7 @@ class TaskFormActivity : BaseActivity() {
|
|||
thisTask.notes = notesEditText.text.toString()
|
||||
thisTask.priority = taskDifficultyButtons.selectedDifficulty
|
||||
if (usesTaskAttributeStats) {
|
||||
thisTask.attribute = getSelectedAttribute()
|
||||
thisTask.attribute = selectedStat
|
||||
}
|
||||
if (taskType == Task.TYPE_HABIT) {
|
||||
thisTask.up = habitScoringButtons.isPositive
|
||||
|
|
|
|||
Loading…
Reference in a new issue