Skip to content

Commit

Permalink
Fixed compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
tladesignz committed Dec 15, 2020
1 parent cb5f1c4 commit f000d58
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,8 @@ protected void onResume() {

mQueue = Volley.newRequestQueue(MoatActivity.this, phs);

if (mCaptcha == null) {
new Handler().postDelayed(this::fetchCaptcha, 1000);
}
if (mCaptcha == null) {
new Handler(Looper.getMainLooper()).postDelayed(this::fetchCaptcha, 1000);
}
}

Expand All @@ -205,15 +204,16 @@ public void onClick(View view) {

@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_refresh:
mEtSolution.setText("");
fetchCaptcha();
return true;

case android.R.id.home:
finish();
return true;
int id = item.getItemId();

if (id == R.id.menu_refresh) {
mEtSolution.setText("");
fetchCaptcha();
return true;
}
else if (id == android.R.id.home) {
finish();
return true;
}

return super.onOptionsItemSelected(item);
Expand Down

0 comments on commit f000d58

Please sign in to comment.