|
|
|
@ -649,14 +649,9 @@ open class Session : RealmObject(), Savable, Editable, StaticRowRepresentableDat |
|
|
|
SessionRow.BANKROLL -> bankroll?.name ?: NULL_TEXT |
|
|
|
SessionRow.BANKROLL -> bankroll?.name ?: NULL_TEXT |
|
|
|
SessionRow.BLINDS -> getFormattedBlinds() |
|
|
|
SessionRow.BLINDS -> getFormattedBlinds() |
|
|
|
SessionRow.BREAK_TIME -> if (this.breakDuration > 0.0) this.breakDuration.toMinutes() else NULL_TEXT |
|
|
|
SessionRow.BREAK_TIME -> if (this.breakDuration > 0.0) this.breakDuration.toMinutes() else NULL_TEXT |
|
|
|
<<<<<<< HEAD |
|
|
|
|
|
|
|
SessionRow.BUY_IN -> this.result?.buyin?.toCurrency(currency) ?: NULL_TEXT |
|
|
|
SessionRow.BUY_IN -> this.result?.buyin?.toCurrency(currency) ?: NULL_TEXT |
|
|
|
SessionRow.CASHED_OUT, SessionRow.PRIZE, SessionRow.NET_RESULT -> this.result?.cashout?.toCurrency(currency) ?: NULL_TEXT |
|
|
|
SessionRow.CASHED_OUT, SessionRow.PRIZE -> this.result?.cashout?.toCurrency(currency) ?: NULL_TEXT |
|
|
|
======= |
|
|
|
SessionRow.NET_RESULT -> this.result?.netResult?.toCurrency(currency) ?: NULL_TEXT |
|
|
|
SessionRow.BUY_IN -> this.result?.buyin?.toCurrency(CurrencyUtils.getCurrency(bankroll)) ?: NULL_TEXT |
|
|
|
|
|
|
|
SessionRow.CASHED_OUT, SessionRow.PRIZE -> this.result?.cashout?.toCurrency(CurrencyUtils.getCurrency(bankroll)) ?: NULL_TEXT |
|
|
|
|
|
|
|
SessionRow.NET_RESULT -> this.result?.netResult?.toCurrency(CurrencyUtils.getCurrency(bankroll)) ?: NULL_TEXT |
|
|
|
|
|
|
|
>>>>>>> 0eba63f... Harmonizing number capture and management + fixing crashes |
|
|
|
|
|
|
|
SessionRow.COMMENT -> if (this.comment.isNotEmpty()) this.comment else NULL_TEXT |
|
|
|
SessionRow.COMMENT -> if (this.comment.isNotEmpty()) this.comment else NULL_TEXT |
|
|
|
SessionRow.END_DATE -> this.endDate?.shortDateTime() ?: NULL_TEXT |
|
|
|
SessionRow.END_DATE -> this.endDate?.shortDateTime() ?: NULL_TEXT |
|
|
|
SessionRow.GAME -> getFormattedGame() |
|
|
|
SessionRow.GAME -> getFormattedGame() |
|
|
|
@ -830,10 +825,20 @@ open class Session : RealmObject(), Savable, Editable, StaticRowRepresentableDat |
|
|
|
} |
|
|
|
} |
|
|
|
SessionRow.INITIAL_BUY_IN -> tournamentEntryFee = if (value == null) null else (value as String).toDouble() |
|
|
|
SessionRow.INITIAL_BUY_IN -> tournamentEntryFee = if (value == null) null else (value as String).toDouble() |
|
|
|
SessionRow.LOCATION -> location = value as Location? |
|
|
|
SessionRow.LOCATION -> location = value as Location? |
|
|
|
SessionRow.PLAYERS -> tournamentNumberOfPlayers = if (value != null) (value as String).toInt() else null |
|
|
|
SessionRow.PLAYERS -> { |
|
|
|
|
|
|
|
if (value is Double) { |
|
|
|
|
|
|
|
this.tournamentNumberOfPlayers = value.toInt() |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.tournamentNumberOfPlayers = null |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
SessionRow.POSITION -> { |
|
|
|
SessionRow.POSITION -> { |
|
|
|
val localResult = if (result != null) result as Result else realm.createObject(Result::class.java) |
|
|
|
val localResult = if (result != null) result as Result else realm.createObject(Result::class.java) |
|
|
|
localResult.tournamentFinalPosition = if (value == null) null else (value as String).toInt() |
|
|
|
if (value is Double) { |
|
|
|
|
|
|
|
localResult.tournamentFinalPosition = value.toInt() |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
localResult.tournamentFinalPosition = null |
|
|
|
|
|
|
|
} |
|
|
|
result = localResult |
|
|
|
result = localResult |
|
|
|
} |
|
|
|
} |
|
|
|
SessionRow.START_DATE -> if (value is Date) { |
|
|
|
SessionRow.START_DATE -> if (value is Date) { |
|
|
|
|