Fix issue where $0 was positive for tournaments

master
Laurent 2 months ago
parent 1f61a7c99f
commit 3f3982cc66
  1. 2
      app/src/main/java/net/pokeranalytics/android/model/realm/Result.kt
  2. 2
      app/src/main/java/net/pokeranalytics/android/util/Preferences.kt

@ -105,7 +105,7 @@ open class Result : RealmObject(), Filterable {
val isPositive: Int val isPositive: Int
get() { get() {
return if (session?.isTournament() == true) { return if (session?.isTournament() == true) {
if (this.cashout ?: -1.0 >= 0.0) 1 else 0 // if cashout is null we want to count a negative session if ((this.cashout ?: -1.0) > 0.0) 1 else 0 // if cashout is null we want to count a negative session
} else { } else {
if (this.net >= 0.0) 1 else 0 if (this.net >= 0.0) 1 else 0
} }

@ -33,7 +33,7 @@ class Preferences {
PATCH_SESSION_SETS("patchSessionSet"), PATCH_SESSION_SETS("patchSessionSet"),
PATCH_TRANSACTION_TYPES_NAMES("patchTransactionTypesNames"), PATCH_TRANSACTION_TYPES_NAMES("patchTransactionTypesNames"),
// PATCH_BLINDS_FORMAT("patchBlindFormat"), // PATCH_BLINDS_FORMAT("patchBlindFormat"),
PATCH_COMPUTABLE_RESULTS("patchPositiveSessions"), PATCH_COMPUTABLE_RESULTS("patchPositiveSessions_v2"),
PATCH_ZERO_TABLE("patchZeroTable"), PATCH_ZERO_TABLE("patchZeroTable"),
SHOW_STOP_NOTIFICATIONS("showStopNotifications"), SHOW_STOP_NOTIFICATIONS("showStopNotifications"),
ADD_NEW_TRANSACTION_TYPES("addNewTransactionTypes_transfer"), ADD_NEW_TRANSACTION_TYPES("addNewTransactionTypes_transfer"),

Loading…
Cancel
Save