Bugfix: Read feed when updating item in database
This commit is contained in:
parent
f0b86c18a8
commit
df45f60cf3
|
@ -134,7 +134,7 @@ public final class DBReader {
|
||||||
*
|
*
|
||||||
* @param items The FeedItems whose Feed-objects should be loaded.
|
* @param items The FeedItems whose Feed-objects should be loaded.
|
||||||
*/
|
*/
|
||||||
private static void loadFeedDataOfFeedItemList(List<FeedItem> items) {
|
public static void loadFeedDataOfFeedItemList(List<FeedItem> items) {
|
||||||
List<Feed> feeds = getFeedList();
|
List<Feed> feeds = getFeedList();
|
||||||
|
|
||||||
Map<Long, Feed> feedIndex = new ArrayMap<>(feeds.size());
|
Map<Long, Feed> feedIndex = new ArrayMap<>(feeds.size());
|
||||||
|
|
|
@ -777,6 +777,7 @@ public class DBWriter {
|
||||||
adapter.open();
|
adapter.open();
|
||||||
adapter.setFeedItemlist(items);
|
adapter.setFeedItemlist(items);
|
||||||
adapter.close();
|
adapter.close();
|
||||||
|
EventBus.getDefault().post(FeedItemEvent.updated(items));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -474,6 +474,7 @@ public class SyncService extends Worker {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DBWriter.removeQueueItem(getApplicationContext(), false, queueToBeRemoved.toArray());
|
DBWriter.removeQueueItem(getApplicationContext(), false, queueToBeRemoved.toArray());
|
||||||
|
DBReader.loadFeedDataOfFeedItemList(updatedItems);
|
||||||
DBWriter.setItemList(updatedItems);
|
DBWriter.setItemList(updatedItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue