Fixed control flow issues.
This commit is contained in:
parent
78fba8a15f
commit
43acc933bf
2 changed files with 3 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue