Pubsub on multiple rivers.

This commit is contained in:
Samuel Clay 2020-12-08 18:39:58 -05:00
parent c257f2c7bd
commit b75948ed60
2 changed files with 14 additions and 5 deletions

11
.vscode/settings.json vendored
View file

@ -5,7 +5,12 @@
"python.linting.pylamaEnabled": false,
"python.linting.flake8Args": [
"--ignore=E501,W293,W503,W504,E302,E722,E226,E221"
]
"python.pythonPath": "venv/bin/python3.7",
"git.ignoreLimitWarning": true
],
"python.pythonPath": "venv/bin/python",
"git.ignoreLimitWarning": true,
"search.exclude": {
"clients": true,
"media/android": true,
"media/ios": true,
},
}

View file

@ -5092,12 +5092,16 @@
NEWSBLUR.log(['Real-time user update for read story', username, message]);
var story_hash = message.replace('story:read:', '');
NEWSBLUR.assets.stories.mark_read_pubsub(story_hash);
NEWSBLUR.assets.dashboard_stories.mark_read_pubsub(story_hash);
NEWSBLUR.app.dashboard_rivers.forEach(function (river) {
river.options.dashboard_stories.mark_read_pubsub(story_hash);
});
} else if (_.string.startsWith(message, 'story:unread')) {
NEWSBLUR.log(['Real-time user update for unread story', username, message]);
var story_hash = message.replace('story:unread:', '');
NEWSBLUR.assets.stories.mark_unread_pubsub(story_hash);
NEWSBLUR.assets.dashboard_stories.mark_unread_pubsub(story_hash);
NEWSBLUR.app.dashboard_rivers.forEach(function (river) {
river.options.dashboard_stories.mark_unread_pubsub(story_hash);
});
} else if (_.string.startsWith(message, 'story:starred') ||
_.string.startsWith(message, 'story:unstarred')) {
this.update_starred_counts();