replace mocky settings with working logout

This commit is contained in:
ikarulus 2019-02-18 01:00:22 +01:00
parent 0c637a9686
commit 1dfbe193fa

View file

@ -74,9 +74,15 @@ public class MainActivity extends AppCompatActivity implements AsyncTaskCallback
// as you specify a parent activity in AndroidManifest.xml. // as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId(); int id = item.getItemId();
//noinspection SimplifiableIfStatement //noinspection SimplifiableIfStatement
if (id == R.id.action_settings) { if (id == R.id.action_settings) {
return true; SharedPreferences sharedPref = getSharedPreferences("persistence", MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPref.edit();
editor.remove("loginkey");
editor.apply();
Intent intent = new Intent(this, LoginActivity.class);
startActivity(intent);
} }
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);