Skip to content

Commit

Permalink
Don't launch results if option was to dismiss
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydtorres committed Mar 1, 2016
1 parent bf3e2d9 commit ae0d54f
Showing 1 changed file with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,20 +288,25 @@ public void postAdoptPosition(final IssueOption option)
new Response.Listener<String>() {
@Override
public void onResponse(String response) {

if (response.contains(LEGISLATION_PASSED))
if (!IssueOption.DISMISS_HEADER.equals(option.header))
{
Intent issueResultsActivity = new Intent(IssueDecisionActivity.this, IssueResultsActivity.class);
issueResultsActivity.putExtra(IssueResultsActivity.RESPONSE_DATA, response);
issueResultsActivity.putExtra(IssueResultsActivity.OPTION_DATA, option);
startActivity(issueResultsActivity);
finish();
if (response.contains(LEGISLATION_PASSED))
{
Intent issueResultsActivity = new Intent(IssueDecisionActivity.this, IssueResultsActivity.class);
issueResultsActivity.putExtra(IssueResultsActivity.RESPONSE_DATA, response);
issueResultsActivity.putExtra(IssueResultsActivity.OPTION_DATA, option);
startActivity(issueResultsActivity);
finish();
}
else
{
SparkleHelper.makeSnackbar(view, getString(R.string.login_error_generic));
}
}
else
{
SparkleHelper.makeSnackbar(view, getString(R.string.login_error_generic));
finish();
}

}
}, new Response.ErrorListener() {
@Override
Expand Down

0 comments on commit ae0d54f

Please sign in to comment.