-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
buildPopup.setTitle("Solution") | ||
buildPopup.setMessage("The song was " + song + " by " + artist) | ||
|
||
buildPopup.setPositiveButton("Correct") { dialog, which -> |
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 2 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.
not urgent now but should consider creating a method to send toast(...)
"Congrats!", Toast.LENGTH_SHORT).show() | ||
} | ||
|
||
buildPopup.setNegativeButton("Wrong") { dialog, which -> |
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 2 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.
Some changes will be needed in the future, but not urgent. Good for now 👍
} | ||
|
||
// FIXME: Find a way to test the popup showing despite not being a component / make robolectric work | ||
/* |
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.
Can remove empty test in comment maybe ?
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.
I think that's why she leaves the FIXME here
import androidx.appcompat.widget.AlertDialogLayout | ||
|
||
|
||
class GamescreenActivity: AppCompatActivity() { |
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.
maybe add javadoc for whole class ?
buildPopup.setTitle("Solution") | ||
buildPopup.setMessage("The song was " + song + " by " + artist) | ||
|
||
buildPopup.setPositiveButton("Correct") { dialog, which -> |
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.
not urgent now but should consider creating a method to send toast(...)
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
The toast can be tested later in another PR as discussed
} | ||
|
||
// FIXME: Find a way to test the popup showing despite not being a component / make robolectric work | ||
/* |
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.
I think that's why she leaves the FIXME here
android:id="@+id/toLocalGameButton" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="L O C A L G A M E" |
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.
consider using @string instead of hardcode it
Code Climate has analyzed commit 86e9abc and detected 2 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 86.6% (80% is the threshold). This pull request will bring the total coverage in the repository to 94.2% (-1.7% change). View more on Code Climate. |
Pull request for the gamescreen that works with a popup. The popup cannot be tested yet as it requires robolectric which I'm unable to make work.