|
|
|
|
@ -20,8 +20,9 @@ import net.pokeranalytics.android.exceptions.PAIllegalStateException |
|
|
|
|
import net.pokeranalytics.android.model.filter.Query |
|
|
|
|
import net.pokeranalytics.android.model.filter.QueryCondition |
|
|
|
|
import net.pokeranalytics.android.model.realm.ComputableResult |
|
|
|
|
import net.pokeranalytics.android.model.realm.UserConfig |
|
|
|
|
import net.pokeranalytics.android.model.realm.Filter |
|
|
|
|
import net.pokeranalytics.android.model.realm.Result |
|
|
|
|
import net.pokeranalytics.android.model.realm.UserConfig |
|
|
|
|
import net.pokeranalytics.android.ui.fragment.components.FilterableFragment |
|
|
|
|
import net.pokeranalytics.android.ui.fragment.components.RealmAsyncListener |
|
|
|
|
import net.pokeranalytics.android.ui.fragment.report.ComposableTableReportFragment |
|
|
|
|
@ -197,7 +198,7 @@ class StatisticsFragment : FilterableFragment(), RealmAsyncListener { |
|
|
|
|
val query = filter?.query ?: Query() |
|
|
|
|
val allSessionGroup = ComputableGroup(query, allStats) |
|
|
|
|
|
|
|
|
|
val cgStats: List<Stat> = listOf( |
|
|
|
|
val cgStats: MutableList<Stat> = mutableListOf( |
|
|
|
|
Stat.NET_RESULT, |
|
|
|
|
Stat.HOURLY_RATE, |
|
|
|
|
Stat.NET_BB_PER_100_HANDS, |
|
|
|
|
@ -208,9 +209,13 @@ class StatisticsFragment : FilterableFragment(), RealmAsyncListener { |
|
|
|
|
Stat.NUMBER_OF_GAMES, |
|
|
|
|
Stat.AVERAGE_BUYIN |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
if (QueryCondition.IsCash.queryWith(realm.where(Result::class.java).isNotNull("tips")).count() > 0) { |
|
|
|
|
cgStats.add(Stat.TOTAL_TIPS) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
val cgSessionGroup = ComputableGroup(Query(QueryCondition.IsCash).merge(query), cgStats) |
|
|
|
|
val tStats: List<Stat> = |
|
|
|
|
listOf( |
|
|
|
|
val tStats: MutableList<Stat> = mutableListOf( |
|
|
|
|
Stat.NET_RESULT, |
|
|
|
|
Stat.HOURLY_RATE, |
|
|
|
|
Stat.ROI, |
|
|
|
|
@ -218,6 +223,10 @@ class StatisticsFragment : FilterableFragment(), RealmAsyncListener { |
|
|
|
|
Stat.NUMBER_OF_GAMES, |
|
|
|
|
Stat.AVERAGE_BUYIN |
|
|
|
|
) |
|
|
|
|
if (QueryCondition.IsTournament.queryWith(realm.where(Result::class.java).isNotNull("tips")).count() > 0) { |
|
|
|
|
tStats.add(Stat.TOTAL_TIPS) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
val tSessionGroup = ComputableGroup(Query(QueryCondition.IsTournament).merge(query), tStats) |
|
|
|
|
|
|
|
|
|
Timber.d(">>>>> Start computations...") |
|
|
|
|
|