|
|
|
@ -759,7 +759,13 @@ open class Session : RealmObject(), Savable, Editable, StaticRowRepresentableDat |
|
|
|
} |
|
|
|
} |
|
|
|
SessionRow.BUY_IN -> { |
|
|
|
SessionRow.BUY_IN -> { |
|
|
|
val localResult = if (this.result != null) this.result as Result else realm.createObject(Result::class.java) |
|
|
|
val localResult = if (this.result != null) this.result as Result else realm.createObject(Result::class.java) |
|
|
|
localResult.buyin = value as Double? |
|
|
|
|
|
|
|
|
|
|
|
if (value == null) { |
|
|
|
|
|
|
|
localResult.buyin = null |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
localResult.buyin = (value as String).toDouble() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.result = localResult |
|
|
|
this.result = localResult |
|
|
|
this.updateRowRepresentation() |
|
|
|
this.updateRowRepresentation() |
|
|
|
} |
|
|
|
} |
|
|
|
@ -776,7 +782,13 @@ open class Session : RealmObject(), Savable, Editable, StaticRowRepresentableDat |
|
|
|
} |
|
|
|
} |
|
|
|
SessionRow.NET_RESULT -> { |
|
|
|
SessionRow.NET_RESULT -> { |
|
|
|
this.result?.let { result -> |
|
|
|
this.result?.let { result -> |
|
|
|
result.netResult = (value as String).toDouble() |
|
|
|
|
|
|
|
|
|
|
|
if (value == null) { |
|
|
|
|
|
|
|
result.netResult = null |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
result.netResult = (value as String).toDouble() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
SessionRow.COMMENT -> comment = value as String? ?: "" |
|
|
|
SessionRow.COMMENT -> comment = value as String? ?: "" |
|
|
|
@ -819,7 +831,12 @@ open class Session : RealmObject(), Savable, Editable, StaticRowRepresentableDat |
|
|
|
SessionRow.TABLE_SIZE -> tableSize = value as Int? |
|
|
|
SessionRow.TABLE_SIZE -> tableSize = value as Int? |
|
|
|
SessionRow.TIPS -> { |
|
|
|
SessionRow.TIPS -> { |
|
|
|
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.tips = value as Double? |
|
|
|
if (value == null) { |
|
|
|
|
|
|
|
localResult.tips = null |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
localResult.tips = (value as String).toDouble() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
result = localResult |
|
|
|
result = localResult |
|
|
|
} |
|
|
|
} |
|
|
|
SessionRow.TOURNAMENT_NAME -> tournamentName = value as TournamentName? |
|
|
|
SessionRow.TOURNAMENT_NAME -> tournamentName = value as TournamentName? |
|
|
|
|