Performance Improvement for #474

This commit is contained in:
David Development 2016-01-08 11:14:18 +01:00
parent 88819d8d38
commit f9902fc41f

View file

@ -327,13 +327,17 @@ public class DatabaseConnectionOrm {
return feeds.size() > 0;
}
public void removeFeedById(long feedId) {
public void removeFeedById(final long feedId) {
daoSession.runInTx(new Runnable() {
@Override
public void run() {
daoSession.getFeedDao().deleteByKey(feedId);
List<RssItem> list = daoSession.getRssItemDao().queryBuilder().where(RssItemDao.Properties.FeedId.eq(feedId)).list();
for (RssItem rssItem : list) {
daoSession.getRssItemDao().delete(rssItem);
}
}});
}
public void renameFeedById(long feedId, String newTitle) {