|
|
|
@ -486,7 +486,7 @@ open class Session : RealmObject(), Savable, Editable, StaticRowRepresentableDat |
|
|
|
* Return the game title |
|
|
|
* Return the game title |
|
|
|
* Example: NL Holdem |
|
|
|
* Example: NL Holdem |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
fun getGameTitle(): String { |
|
|
|
fun getFormattedGame(): String { |
|
|
|
var gameTitle = "" |
|
|
|
var gameTitle = "" |
|
|
|
limit?.let { |
|
|
|
limit?.let { |
|
|
|
if (it >= 0 && it < Limit.values().size) { |
|
|
|
if (it >= 0 && it < Limit.values().size) { |
|
|
|
@ -523,7 +523,6 @@ open class Session : RealmObject(), Savable, Editable, StaticRowRepresentableDat |
|
|
|
SessionSetManager.removeFromTimeline(this) |
|
|
|
SessionSetManager.removeFromTimeline(this) |
|
|
|
|
|
|
|
|
|
|
|
// cleanup unnecessary related objects |
|
|
|
// cleanup unnecessary related objects |
|
|
|
// set.deleteFromRealm() |
|
|
|
|
|
|
|
this.result?.deleteFromRealm() |
|
|
|
this.result?.deleteFromRealm() |
|
|
|
this.computableResults?.deleteAllFromRealm() |
|
|
|
this.computableResults?.deleteAllFromRealm() |
|
|
|
|
|
|
|
|
|
|
|
@ -622,7 +621,7 @@ open class Session : RealmObject(), Savable, Editable, StaticRowRepresentableDat |
|
|
|
SessionRow.CASHED_OUT, SessionRow.PRIZE, SessionRow.NET_RESULT -> this.result?.cashout?.toCurrency(CurrencyUtils.getCurrency(bankroll)) ?: NULL_TEXT |
|
|
|
SessionRow.CASHED_OUT, SessionRow.PRIZE, SessionRow.NET_RESULT -> this.result?.cashout?.toCurrency(CurrencyUtils.getCurrency(bankroll)) ?: NULL_TEXT |
|
|
|
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 -> getGameTitle() |
|
|
|
SessionRow.GAME -> getFormattedGame() |
|
|
|
SessionRow.INITIAL_BUY_IN -> tournamentEntryFee?.toCurrency(CurrencyUtils.getCurrency(bankroll)) ?: NULL_TEXT |
|
|
|
SessionRow.INITIAL_BUY_IN -> tournamentEntryFee?.toCurrency(CurrencyUtils.getCurrency(bankroll)) ?: NULL_TEXT |
|
|
|
SessionRow.LOCATION -> location?.name ?: NULL_TEXT |
|
|
|
SessionRow.LOCATION -> location?.name ?: NULL_TEXT |
|
|
|
SessionRow.PLAYERS -> tournamentNumberOfPlayers?.toString() ?: NULL_TEXT |
|
|
|
SessionRow.PLAYERS -> tournamentNumberOfPlayers?.toString() ?: NULL_TEXT |
|
|
|
|