|
|
|
|
@ -32,15 +32,14 @@ import net.pokeranalytics.android.ui.adapter.UnmanagedRowRepresentableException |
|
|
|
|
import net.pokeranalytics.android.ui.graph.Graph |
|
|
|
|
import net.pokeranalytics.android.ui.view.* |
|
|
|
|
import net.pokeranalytics.android.ui.view.rows.SessionPropertiesRow |
|
|
|
|
import net.pokeranalytics.android.util.CrashLogging |
|
|
|
|
import net.pokeranalytics.android.util.NULL_TEXT |
|
|
|
|
import net.pokeranalytics.android.util.TextFormat |
|
|
|
|
import net.pokeranalytics.android.util.UserDefaults |
|
|
|
|
import net.pokeranalytics.android.util.* |
|
|
|
|
import net.pokeranalytics.android.util.extensions.hourMinute |
|
|
|
|
import net.pokeranalytics.android.util.extensions.shortDateTime |
|
|
|
|
import net.pokeranalytics.android.util.extensions.toCurrency |
|
|
|
|
import net.pokeranalytics.android.util.extensions.toMinutes |
|
|
|
|
import java.text.DateFormat |
|
|
|
|
import java.text.NumberFormat |
|
|
|
|
import java.text.ParseException |
|
|
|
|
import java.util.* |
|
|
|
|
import java.util.Currency |
|
|
|
|
|
|
|
|
|
@ -328,7 +327,7 @@ open class Session : RealmObject(), Savable, RowUpdatable, RowRepresentable, Tim |
|
|
|
|
|
|
|
|
|
var cgBlinds: String? = null |
|
|
|
|
set(value) { |
|
|
|
|
field = value |
|
|
|
|
field = cleanupBlinds(value) |
|
|
|
|
this.generateStakes() |
|
|
|
|
this.defineHighestBet() |
|
|
|
|
this.computeStats() |
|
|
|
|
@ -1093,6 +1092,26 @@ open class Session : RealmObject(), Savable, RowUpdatable, RowRepresentable, Tim |
|
|
|
|
// this.cgBiggestBet = bets.maxOrNull() |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
private fun cleanupBlinds(blinds: String?): String? { |
|
|
|
|
|
|
|
|
|
if (blinds == null) { |
|
|
|
|
return null |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
val blindValues = blinds.split(BLIND_SEPARATOR).mapNotNull { |
|
|
|
|
try { |
|
|
|
|
NumberFormat.getInstance().parse(it) |
|
|
|
|
} catch (e: ParseException) { |
|
|
|
|
null |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return if (blindValues.isNotEmpty()) { |
|
|
|
|
blindValues.joinToString(BLIND_SEPARATOR) |
|
|
|
|
} else { |
|
|
|
|
null |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// StakesHolder |
|
|
|
|
|
|
|
|
|
override val ante: Double? |
|
|
|
|
|