Performance Improvement for #474
This commit is contained in:
parent
88819d8d38
commit
f9902fc41f
1 changed files with 10 additions and 6 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue