-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
…d new scoreboard value
fun setupProfile(user: UserProfile){ | ||
findViewById<TextView>(R.id.handle).text = user.handle | ||
findViewById<TextView>(R.id.username).text = user.username | ||
findViewById<TextView>(R.id.totalGames).text = user.totalGames.toString() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 4 locations. Consider refactoring.
findViewById<TextView>(R.id.handle).text = user.handle | ||
findViewById<TextView>(R.id.username).text = user.username | ||
findViewById<TextView>(R.id.totalGames).text = user.totalGames.toString() | ||
findViewById<TextView>(R.id.correctSongs).text = user.correctSongs.toString() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 4 locations. Consider refactoring.
findViewById<TextView>(R.id.username).text = user.username | ||
findViewById<TextView>(R.id.totalGames).text = user.totalGames.toString() | ||
findViewById<TextView>(R.id.correctSongs).text = user.correctSongs.toString() | ||
findViewById<TextView>(R.id.bestScore).text = user.bestScore.toString() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 4 locations. Consider refactoring.
findViewById<TextView>(R.id.totalGames).text = user.totalGames.toString() | ||
findViewById<TextView>(R.id.correctSongs).text = user.correctSongs.toString() | ||
findViewById<TextView>(R.id.bestScore).text = user.bestScore.toString() | ||
findViewById<TextView>(R.id.ranking).text = user.ranking.toString() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 4 locations. Consider refactoring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
It would be even better if you manage to remove the duplications, but these are optional ;)
btnGreeting.setOnClickListener { | ||
greetingIntent.putExtra("name", txtInput.text.toString()) | ||
startActivity(greetingIntent) | ||
btnGreeting.setOnClickListener { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the indentations be too much here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Code Climate has analyzed commit d53c95b and detected 4 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 86.3% (80% is the threshold). This pull request will bring the total coverage in the repository to 96.0% (-3.4% change). View more on Code Climate. |
Basic layout for the profile. The display of user image functionality is disabled for the time being.