|
|
|
|
@ -47,6 +47,7 @@ class StatisticDetailsFragment : PokerAnalyticsFragment() { |
|
|
|
|
private lateinit var computableGroup: ComputableGroup |
|
|
|
|
private lateinit var graphFragment: GraphFragment |
|
|
|
|
private lateinit var selectedReport: Report |
|
|
|
|
private lateinit var aggregationTypes: List<AggregationType> |
|
|
|
|
|
|
|
|
|
private var title: String? = null |
|
|
|
|
private var reports: MutableMap<AggregationType, Report> = hashMapOf() |
|
|
|
|
@ -99,16 +100,17 @@ class StatisticDetailsFragment : PokerAnalyticsFragment() { |
|
|
|
|
fragmentTransaction.add(R.id.graphContainer, graphFragment) |
|
|
|
|
fragmentTransaction.commit() |
|
|
|
|
|
|
|
|
|
stat.aggregationTypes.firstOrNull()?.let { aggregationType -> |
|
|
|
|
this.aggregationTypes = stat.aggregationTypes |
|
|
|
|
|
|
|
|
|
this.aggregationTypes.firstOrNull()?.let { aggregationType -> |
|
|
|
|
reports[aggregationType]?.let { report -> |
|
|
|
|
setGraphData(report, aggregationType) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
toolbar.title = this.title ?: stat.localizedTitle(requireContext()) |
|
|
|
|
val aggregationTypes = stat.aggregationTypes |
|
|
|
|
|
|
|
|
|
aggregationTypes.forEachIndexed { index, type -> |
|
|
|
|
this.aggregationTypes.forEachIndexed { index, type -> |
|
|
|
|
val chip = Chip(requireContext()) |
|
|
|
|
chip.id = index |
|
|
|
|
chip.text = requireContext().getString(type.resId) |
|
|
|
|
|