Created method for loading extra information of a feeditem

This commit is contained in:
daniel oeh 2012-10-24 21:25:31 +02:00
parent 0fb4e9582b
commit ff8a1219af
1 changed files with 20 additions and 0 deletions

View File

@ -1318,6 +1318,26 @@ public class FeedManager {
cursor.close();
}
public void loadExtraInformationOfItem(final Context context,
final FeedItem item, FeedManager.TaskCallback callback) {
dbExec.execute(new FeedManager.Task(new Handler(), callback) {
@Override
public void execute() {
PodDBAdapter adapter = new PodDBAdapter(context);
adapter.open();
Cursor extraCursor = adapter.getExtraInformationOfItem(item);
if (extraCursor.moveToFirst()) {
item.setDescription(extraCursor
.getString(PodDBAdapter.IDX_FI_EXTRA_DESCRIPTION));
item.setContentEncoded(extraCursor
.getString(PodDBAdapter.IDX_FI_EXTRA_CONTENT_ENCODED));
}
adapter.close();
}
});
}
public List<Feed> getFeeds() {
return feeds;
}