Add local account sync result notification

This commit is contained in:
Shinokuni 2020-02-11 19:31:35 +01:00
parent 46712f4c5e
commit 2453f35179
2 changed files with 5 additions and 1 deletions

View File

@ -22,6 +22,7 @@ import com.readrops.readropslibrary.localfeed.RSSQueryResult;
import com.readrops.readropslibrary.localfeed.atom.ATOMFeed;
import com.readrops.readropslibrary.localfeed.json.JSONFeed;
import com.readrops.readropslibrary.localfeed.rss.RSSFeed;
import com.readrops.readropslibrary.services.SyncResult;
import com.readrops.readropslibrary.utils.LibUtils;
import com.readrops.readropslibrary.utils.ParseException;
import com.readrops.readropslibrary.utils.UnknownFormatException;
@ -44,6 +45,8 @@ public class LocalFeedRepository extends ARepository<Void> {
public LocalFeedRepository(@NonNull Context context, @Nullable Account account) {
super(context, account);
syncResult = new SyncResult();
}
@Override
@ -247,6 +250,7 @@ public class LocalFeedRepository extends ARepository<Void> {
}
}
syncResult.getItems().addAll(itemsToInsert);
database.itemDao().insert(itemsToInsert);
}

View File

@ -6,7 +6,7 @@ import com.readrops.readropsdb.entities.Item
class SyncResult {
var items: List<Item> = listOf()
var items: List<Item> = mutableListOf()
var feeds: List<Feed> = listOf()