|
|
|
@ -313,15 +313,17 @@ open class Session : RealmObject(), SessionInterface, Savable, |
|
|
|
resId = R.string.hour_rate_without_pauses, value = result?.net.toString() |
|
|
|
resId = R.string.hour_rate_without_pauses, value = result?.net.toString() |
|
|
|
) |
|
|
|
) |
|
|
|
) |
|
|
|
) |
|
|
|
rows.add( |
|
|
|
|
|
|
|
HeaderRowRepresentable( |
|
|
|
if (type == TYPE_GAME) { |
|
|
|
RowViewType.HEADER_TITLE_VALUE, |
|
|
|
rows.add( |
|
|
|
resId = R.string.bankroll_variation, value = result?.net.toString() |
|
|
|
HeaderRowRepresentable( |
|
|
|
|
|
|
|
RowViewType.HEADER_TITLE_VALUE, |
|
|
|
|
|
|
|
resId = R.string.bankroll_variation, value = result?.net.toString() |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else -> { |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else -> {} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Rows |
|
|
|
// Rows |
|
|
|
@ -387,8 +389,14 @@ open class Session : RealmObject(), SessionInterface, Savable, |
|
|
|
} |
|
|
|
} |
|
|
|
SessionRow.BUY_IN -> { |
|
|
|
SessionRow.BUY_IN -> { |
|
|
|
// Add first & second buttons values, current value & set the 2 edit texts |
|
|
|
// Add first & second buttons values, current value & set the 2 edit texts |
|
|
|
data.add(RowRepresentableEditDescriptor(100.0 * (cgBigBlind ?: 0.0))) |
|
|
|
if (cgBigBlind != null) { |
|
|
|
data.add(RowRepresentableEditDescriptor(200.0 * (cgBigBlind ?: 0.0))) |
|
|
|
data.add(RowRepresentableEditDescriptor(100.0 * (cgBigBlind ?: 0.0))) |
|
|
|
|
|
|
|
data.add(RowRepresentableEditDescriptor(200.0 * (cgBigBlind ?: 0.0))) |
|
|
|
|
|
|
|
} else if (tournamentEntryFee != null) { |
|
|
|
|
|
|
|
data.add(RowRepresentableEditDescriptor((tournamentEntryFee ?: 0.0) * 1.0)) |
|
|
|
|
|
|
|
data.add(RowRepresentableEditDescriptor((tournamentEntryFee ?: 0.0) * 2.0)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
data.add(RowRepresentableEditDescriptor(buyin)) |
|
|
|
data.add(RowRepresentableEditDescriptor(buyin)) |
|
|
|
data.add( |
|
|
|
data.add( |
|
|
|
RowRepresentableEditDescriptor( |
|
|
|
RowRepresentableEditDescriptor( |
|
|
|
@ -525,13 +533,15 @@ open class Session : RealmObject(), SessionInterface, Savable, |
|
|
|
} |
|
|
|
} |
|
|
|
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 -> ""//TODO |
|
|
|
SessionRow.PLAYERS -> { |
|
|
|
|
|
|
|
}//TODO |
|
|
|
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() |
|
|
|
localResult.tournamentFinalPosition = if (value == null) null else (value as String).toInt() |
|
|
|
result = localResult |
|
|
|
result = localResult |
|
|
|
} |
|
|
|
} |
|
|
|
SessionRow.PRIZE -> ""//TODO |
|
|
|
SessionRow.PRIZE -> { |
|
|
|
|
|
|
|
}//TODO |
|
|
|
SessionRow.START_DATE -> if (value is Date?) { |
|
|
|
SessionRow.START_DATE -> if (value is Date?) { |
|
|
|
if (value == null) { |
|
|
|
if (value == null) { |
|
|
|
timeFrame = null |
|
|
|
timeFrame = null |
|
|
|
|