Refactoring #513 (remove sync of starred state) (sync read state if read only)

This commit is contained in:
David Development 2016-04-26 17:37:12 +02:00
parent 67a7fd75c5
commit 9c087edaa8

View file

@ -322,13 +322,15 @@ public class DatabaseConnectionOrm {
public void updateRssItem(RssItem rssItem) {
daoSession.getRssItemDao().update(rssItem);
for(RssItem rssItem1 : daoSession.getRssItemDao().queryBuilder().where(
RssItemDao.Properties.Fingerprint.eq(rssItem.getFingerprint()),
RssItemDao.Properties.Id.notEq(rssItem.getId()))
.list()) {
rssItem1.setRead_temp(rssItem.getRead_temp());
rssItem1.setStarred_temp(rssItem.getStarred_temp());
daoSession.getRssItemDao().update(rssItem1);
if(rssItem.getRead_temp()) {
for (RssItem rssItem1 : daoSession.getRssItemDao().queryBuilder().where(
RssItemDao.Properties.Fingerprint.eq(rssItem.getFingerprint()),
RssItemDao.Properties.Id.notEq(rssItem.getId()))
.list()) {
rssItem1.setRead_temp(rssItem.getRead_temp());
//rssItem1.setStarred_temp(rssItem.getStarred_temp());
daoSession.getRssItemDao().update(rssItem1);
}
}
}