Merge pull request #2310 from dklimkin/datareader

Some cleanup on DBReader:
This commit is contained in:
Martin Fietz 2017-04-22 18:38:20 +02:00 committed by GitHub
commit 6a30dd611a
2 changed files with 442 additions and 383 deletions

View File

@ -1156,7 +1156,9 @@ public class PodDBAdapter {
+ TABLE_NAME_FEED_IMAGES + " WHERE " + KEY_ID + " IN "
+ buildInOperator(neededLength), parts);
}
return new MergeCursor(cursors);
Cursor result = new MergeCursor(cursors);
result.moveToFirst();
return result;
} else {
return db.query(TABLE_NAME_FEED_IMAGES, null, KEY_ID + " IN "
+ buildInOperator(length), imageIds, null, null, null);
@ -1341,7 +1343,9 @@ public class PodDBAdapter {
+ TABLE_NAME_FEED_MEDIA + " WHERE " + KEY_FEEDITEM + " IN "
+ buildInOperator(neededLength), parts);
}
return new MergeCursor(cursors);
Cursor result = new MergeCursor(cursors);
result.moveToFirst();
return result;
} else {
return db.query(TABLE_NAME_FEED_MEDIA, null, KEY_FEEDITEM + " IN "
+ buildInOperator(length), itemIds, null, null, null);