fixed topic posting bug, if there was only 1 topic in a category the next posted topic in that category wasnt showing up until a full page reload

This commit is contained in:
Baris Usakli
2013-11-21 15:33:41 -05:00
parent f1df8c2479
commit 866d813218
3 changed files with 10 additions and 6 deletions

View File

@@ -94,17 +94,20 @@ define(function () {
if (numTopics > 0) {
for (var x = 0; x < numTopics; x++) {
if ($(topics[x]).find('.icon-pushpin').length)
if ($(topics[x]).find('.icon-pushpin').length) {
if(x === numTopics - 1) {
topic.insertAfter(topics[x]);
}
continue;
}
topic.insertBefore(topics[x]);
topic.hide().fadeIn('slow');
break;
}
} else {
container.append(topic);
topic.hide().fadeIn('slow');
}
topic.hide().fadeIn('slow');
socket.emit('api:categories.getRecentReplies', templates.get('category_id'));
addActiveUser(data);