Skip to content

Commit

Permalink
fix app crash when trying to add feed while no account is setup
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Development committed Feb 8, 2019
1 parent a64dcf0 commit b135009
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -749,10 +749,14 @@ public boolean onOptionsItemSelected(MenuItem item) {
StartLoginFragment(NewsReaderListActivity.this);
break;

case R.id.action_add_new_feed:
Intent newFeedIntent = new Intent(this, NewFeedActivity.class);
startActivityForResult(newFeedIntent, RESULT_ADD_NEW_FEED);
break;
case R.id.action_add_new_feed:
if(mApi.getAPI() != null) {
Intent newFeedIntent = new Intent(this, NewFeedActivity.class);
startActivityForResult(newFeedIntent, RESULT_ADD_NEW_FEED);
} else {
StartLoginFragment(NewsReaderListActivity.this);
}
break;

case R.id.menu_StartImageCaching:
final DatabaseConnectionOrm dbConn = new DatabaseConnectionOrm(this);
Expand Down

0 comments on commit b135009

Please sign in to comment.