|
|
|
|
@ -71,27 +71,27 @@ class FavoriteSessionFinder { |
|
|
|
|
private const val FAVORITE_SIGNIFICANT_SESSIONS = 15L |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Copies the favorite session parameters on the [newSession] |
|
|
|
|
* Copies the favorite session parameters on the [session] |
|
|
|
|
*/ |
|
|
|
|
fun copyParametersFromFavoriteSession(newSession: Session, location: Location?, context: Context) { |
|
|
|
|
fun copyParametersFromFavoriteSession(session: Session, location: Location?, context: Context) { |
|
|
|
|
|
|
|
|
|
val favoriteSession = |
|
|
|
|
favoriteSession(newSession.type, location, newSession.realm, context) |
|
|
|
|
favoriteSession(session.type, location, session.realm, context) |
|
|
|
|
|
|
|
|
|
favoriteSession?.let { fav -> |
|
|
|
|
|
|
|
|
|
newSession.limit = fav.limit |
|
|
|
|
newSession.game = fav.game |
|
|
|
|
newSession.bankroll = fav.bankroll |
|
|
|
|
newSession.tableSize = fav.tableSize |
|
|
|
|
session.limit = fav.limit |
|
|
|
|
session.game = fav.game |
|
|
|
|
session.bankroll = fav.bankroll |
|
|
|
|
session.tableSize = fav.tableSize |
|
|
|
|
|
|
|
|
|
when (newSession.type) { |
|
|
|
|
when (session.type) { |
|
|
|
|
Session.Type.CASH_GAME.ordinal -> { |
|
|
|
|
newSession.cgSmallBlind = fav.cgSmallBlind |
|
|
|
|
newSession.cgBigBlind = fav.cgBigBlind |
|
|
|
|
session.cgSmallBlind = fav.cgSmallBlind |
|
|
|
|
session.cgBigBlind = fav.cgBigBlind |
|
|
|
|
} |
|
|
|
|
Session.Type.TOURNAMENT.ordinal -> { |
|
|
|
|
newSession.tournamentEntryFee = fav.tournamentEntryFee |
|
|
|
|
session.tournamentEntryFee = fav.tournamentEntryFee |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|