|
|
|
|
@ -55,18 +55,7 @@ enum class Comparator { |
|
|
|
|
TOURNAMENT -> listOf(QueryCondition.TOURNAMENT) |
|
|
|
|
LIVE -> listOf(QueryCondition.LIVE) |
|
|
|
|
ONLINE -> listOf(QueryCondition.ONLINE) |
|
|
|
|
BLIND -> { |
|
|
|
|
val blinds = arrayListOf<QueryCondition.BLIND>() |
|
|
|
|
val realm = Realm.getDefaultInstance() |
|
|
|
|
realm.where<Session>().distinct("blinds", "bankroll.currency.code").findAll().sort("cgSmallBlind", Sort.ASCENDING).map { |
|
|
|
|
it.blinds?.let { stake -> |
|
|
|
|
blinds.add(QueryCondition.BLIND().apply { blind = stake |
|
|
|
|
hasDefaultCurrency = it.hasDefaultCurrency }) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
realm.close() |
|
|
|
|
blinds |
|
|
|
|
} |
|
|
|
|
BLIND -> Criteria.Blinds.queryConditions |
|
|
|
|
BANKROLL -> Criteria.Bankrolls.queryConditions |
|
|
|
|
GAME -> Criteria.Games.queryConditions |
|
|
|
|
TOURNAMENT_NAME-> Criteria.TournamentNames.queryConditions |
|
|
|
|
|