mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-20 12:49:02 +00:00
disable stat allocation if under level 10
This commit is contained in:
parent
3e39633313
commit
3f7f370d91
1 changed files with 8 additions and 1 deletions
|
|
@ -160,7 +160,14 @@ class StatsFragment: BaseMainFragment() {
|
|||
distributeClassButton.isChecked = allocationMode == Stats.AUTO_ALLOCATE_CLASSBASED
|
||||
distributeTaskButton.isChecked = allocationMode == Stats.AUTO_ALLOCATE_TASKBASED
|
||||
|
||||
val canDistributePoints =0 < (user?.stats?.points ?: 0)
|
||||
val canDistributePoints = 0 < (user?.stats?.points ?: 0) && 10 <= (user?.stats?.lvl ?: 0)
|
||||
if (10 <= (user?.stats?.lvl ?: 0)) {
|
||||
automaticAllocationSwitch.visibility = View.VISIBLE
|
||||
automaticAllocationSwitch.visibility = View.VISIBLE
|
||||
} else {
|
||||
automaticAllocationSwitch.visibility = View.GONE
|
||||
automaticAllocationSwitch.visibility = View.GONE
|
||||
}
|
||||
strengthStatsView.canDistributePoints = canDistributePoints
|
||||
intelligenceStatsView.canDistributePoints = canDistributePoints
|
||||
constitutionStatsView.canDistributePoints = canDistributePoints
|
||||
|
|
|
|||
Loading…
Reference in a new issue