mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-19 20:29:02 +00:00
Hide stats section if opted out of classes. Fixes #739
This commit is contained in:
parent
ad12aeb9fe
commit
51837cdf6b
1 changed files with 8 additions and 3 deletions
|
|
@ -400,10 +400,15 @@ open class MainActivity : BaseActivity(), TutorialView.OnTutorialReaction {
|
|||
}
|
||||
val statsItem = drawerFragment?.getItemWithIdentifier(NavigationDrawerFragment.SIDEBAR_STATS)
|
||||
if (statsItem != null) {
|
||||
if (user?.stats?.lvl ?: 0 >= 10 && user?.stats?.points ?: 0 > 0) {
|
||||
statsItem.additionalInfo = user?.stats?.points.toString()
|
||||
if (user?.preferences?.disableClasses != true) {
|
||||
if (user?.stats?.lvl ?: 0 >= 10 && user?.stats?.points ?: 0 > 0) {
|
||||
statsItem.additionalInfo = user?.stats?.points.toString()
|
||||
} else {
|
||||
statsItem.additionalInfo = null
|
||||
}
|
||||
statsItem.isVisible = true
|
||||
} else {
|
||||
statsItem.additionalInfo = null
|
||||
statsItem.isVisible = false
|
||||
}
|
||||
drawerFragment?.updateItem(statsItem)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue