mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Better detection of social stories when marking read.
This commit is contained in:
parent
4784b4ef56
commit
0000ab2139
1 changed files with 9 additions and 7 deletions
|
@ -90,15 +90,17 @@ public class FeedUtils {
|
|||
ArrayList<ContentProviderOperation> updateOps = new ArrayList<ContentProviderOperation>();
|
||||
|
||||
for (Story story : stories) {
|
||||
// ops for the local DB
|
||||
appendStoryReadOperations(story, updateOps);
|
||||
// API call to ensure the story is marked read in the context of a feed
|
||||
storiesJson.put(story.feedId, story.storyHash);
|
||||
// API call to ensure the story is marked read in the context of a social share
|
||||
if (story.socialUserId != null) {
|
||||
// TODO: some stories returned by /social/river_stories seem to have neither a
|
||||
// socialUserId nor a sourceUserId, so they accidentally get submitted non-
|
||||
// socially. If the API fixes this before we ditch social-specific logic,
|
||||
// we can fix that bug right here.
|
||||
putMapHeirarchy(socialStories, story.socialUserId, story.feedId, story.id);
|
||||
} else {
|
||||
storiesJson.put(story.feedId, story.id);
|
||||
putMapHeirarchy(socialStories, story.socialUserId, story.feedId, story.storyHash);
|
||||
} else if ((story.friendUserIds != null) && (story.friendUserIds.length > 0) && (story.friendUserIds[0] != null)) {
|
||||
putMapHeirarchy(socialStories, story.friendUserIds[0], story.feedId, story.storyHash);
|
||||
} else if ((story.sharedUserIds != null) && (story.sharedUserIds.length > 0) && (story.sharedUserIds[0] != null)) {
|
||||
putMapHeirarchy(socialStories, story.sharedUserIds[0], story.feedId, story.storyHash);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue