Fixed control flow issues.

This commit is contained in:
Christine Emrich 2015-11-16 14:05:18 +01:00
parent 78fba8a15f
commit 43acc933bf
2 changed files with 3 additions and 4 deletions

View file

@ -20,9 +20,8 @@ public class RecyclerViewAssertions implements ViewAssertion {
RecyclerView recyclerView = (RecyclerView) view;
LinearLayoutManager layoutManager = ((LinearLayoutManager)recyclerView.getLayoutManager());
int firstVisiblePosition = layoutManager.findFirstVisibleItemPosition();
if(firstVisiblePosition == mExpectedPos)
return;
else
if(firstVisiblePosition != mExpectedPos)
throw new RuntimeException("Wrong position! Expected: " + mExpectedPos + " but was: " + firstVisiblePosition);
}
}

View file

@ -334,7 +334,7 @@ public class DatabaseConnectionOrm {
public boolean doesRssItemAlreadyExsists (long feedId) {
List<RssItem> feeds = daoSession.getRssItemDao().queryBuilder().where(RssItemDao.Properties.Id.eq(feedId)).list();
return (feeds.size() <= 0) ? false : true;
return feeds.size() > 0;
}