Skip to content

Commit

Permalink
#31: New players have "No Preference" by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Entreco committed Jul 31, 2018
1 parent d92fda5 commit 0002bba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class EditPlayerViewModel @Inject constructor(private val createPlayerUsecase: C
}

when {
isNewPlayer(existing) -> createPlayerUsecase.exec(CreatePlayerRequest(desiredName, 16),
isNewPlayer(existing) -> createPlayerUsecase.exec(CreatePlayerRequest(desiredName),
onCreateSuccess(navigator),
onCreateFailed())
isAlreadyPlaying(existing!!, desiredName) -> errorMsg.set(R.string.err_player_already_in_match)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ package nl.entreco.domain.setup.players
/**
* Created by Entreco on 02/01/2018.
*/
class CreatePlayerRequest(val name: String, val double: Int)
class CreatePlayerRequest(val name: String, val double: Int = 0)

0 comments on commit 0002bba

Please sign in to comment.