Skip to content

Commit

Permalink
Updated rules for displaying test complete notification
Browse files Browse the repository at this point in the history
  • Loading branch information
aanorbel committed Oct 31, 2023
1 parent d1c53cd commit de8667b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,13 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
return false;
}
});
// TODO(aanorbel): Fix change in state(theme change from notification) changing the selected item.
binding.bottomNavigation.setSelectedItemId(getIntent().getIntExtra(RES_ITEM, R.id.dashboard));
if (getIntent().hasExtra(RES_SNACKBAR_MESSAGE)) {
/* Check if we are restoring the activity from a saved state first.
* If we have a message to show, show it as a snackbar.
* This is used to show the message from test completion.
*/
if (savedInstanceState == null && getIntent().hasExtra(RES_SNACKBAR_MESSAGE)) {
Snackbar.make(binding.getRoot(), getIntent().getStringExtra(RES_SNACKBAR_MESSAGE), Snackbar.LENGTH_SHORT)
.setAnchorView(binding.bottomNavigation)
.show();
Expand Down

0 comments on commit de8667b

Please sign in to comment.