Add transaction bucket list for bankroll

dev
Aurelien Hubert 7 years ago
parent df72a2d160
commit d77ced5d7e
  1. 11
      app/src/main/java/net/pokeranalytics/android/ui/fragment/BankrollDetailsFragment.kt

@ -112,6 +112,17 @@ class BankrollDetailsFragment : PokerAnalyticsFragment(), StaticRowRepresentable
rows.add(CustomizableRowRepresentable(RowViewType.TITLE_VALUE, resId = R.string.net_result, computedStat = netComputedStat))
rows.add(CustomizableRowRepresentable(RowViewType.TITLE_VALUE, resId = R.string.net_banked, computedStat = netBankedComputedStat))
if (bankrollReport.transactionBuckets.isNotEmpty()) {
rows.add(CustomizableRowRepresentable(RowViewType.HEADER_TITLE, resId = R.string.operations))
bankrollReport.transactionBuckets.keys.forEach { key ->
bankrollReport.transactionBuckets[key]?.let { transactionBucket ->
val typeName = transactionBucket.transactions.firstOrNull()?.type?.getDisplayName()
val computedStat = ComputedStat(Stat.NET_RESULT, transactionBucket.total)
rows.add(CustomizableRowRepresentable(RowViewType.TITLE_VALUE, title = typeName, computedStat = computedStat))
}
}
}
}
/**

Loading…
Cancel
Save