Hide counter session for some stats

feature/top10
Laurent 7 years ago
parent e361fab41c
commit c0c06a9972
  1. 8
      app/src/main/java/net/pokeranalytics/android/calculus/Stat.kt
  2. 1
      app/src/main/java/net/pokeranalytics/android/ui/view/LegendView.kt

@ -241,6 +241,14 @@ enum class Stat : RowRepresentable {
} }
} }
val shouldShowNumberOfSessions: Boolean
get() {
return when (this) {
NUMBER_OF_GAMES, NUMBER_OF_SETS -> false
else -> true
}
}
override val viewType: Int = RowViewType.TITLE_VALUE.ordinal override val viewType: Int = RowViewType.TITLE_VALUE.ordinal
} }

@ -58,6 +58,7 @@ class LegendView : FrameLayout {
} }
this.counter.text = "$counter ${context.getString(R.string.sessions)}" this.counter.text = "$counter ${context.getString(R.string.sessions)}"
this.counter.isVisible = stat.shouldShowNumberOfSessions
} }

Loading…
Cancel
Save