fix new topics showing up in all categories on post

v1.18.x
barisusakli 10 years ago
parent 699b74603b
commit dfae2ea0d7

@ -180,6 +180,11 @@ define('forum/category', ['composer', 'forum/pagination', 'forum/infinitescroll'
}
Category.onNewTopic = function(topic) {
var cid = ajaxify.variables.get('category_id');
if(!topic || parseInt(topic.cid, 10) !== parseInt(cid, 10)) {
return;
}
$(window).trigger('filter:categories.new_topic', topic);
templates.parse('category', 'topics', {

@ -143,7 +143,7 @@ define('forum/topic', dependencies, function(pagination, infinitescroll, threadT
function onNewPost(data) {
var tid = ajaxify.variables.get('topic_id');
if(data && data.posts && data.posts.length && data.posts[0].tid !== tid) {
if(data && data.posts && data.posts.length && parseInt(data.posts[0].tid, 10) !== parseInt(tid, 10)) {
return;
}

Loading…
Cancel
Save