mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 22:45:46 +01:00
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:
@@ -94,17 +94,20 @@ define(function () {
|
|||||||
|
|
||||||
if (numTopics > 0) {
|
if (numTopics > 0) {
|
||||||
for (var x = 0; x < numTopics; x++) {
|
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;
|
continue;
|
||||||
|
}
|
||||||
topic.insertBefore(topics[x]);
|
topic.insertBefore(topics[x]);
|
||||||
topic.hide().fadeIn('slow');
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
container.append(topic);
|
container.append(topic);
|
||||||
topic.hide().fadeIn('slow');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
topic.hide().fadeIn('slow');
|
||||||
socket.emit('api:categories.getRecentReplies', templates.get('category_id'));
|
socket.emit('api:categories.getRecentReplies', templates.get('category_id'));
|
||||||
|
|
||||||
addActiveUser(data);
|
addActiveUser(data);
|
||||||
|
|||||||
@@ -34,8 +34,9 @@ define(function() {
|
|||||||
|
|
||||||
app.enter_room('topic_' + tid);
|
app.enter_room('topic_' + tid);
|
||||||
|
|
||||||
if($('#post-container .sub-posts').length)
|
if($('#post-container .sub-posts').length) {
|
||||||
$('.topic-main-buttons').removeClass('hide');
|
$('.topic-main-buttons').removeClass('hide').parent().removeClass('hide');
|
||||||
|
}
|
||||||
|
|
||||||
$('.twitter-share').on('click', function () {
|
$('.twitter-share').on('click', function () {
|
||||||
window.open(twitter_url, '_blank', 'width=550,height=420,scrollbars=no,status=no');
|
window.open(twitter_url, '_blank', 'width=550,height=420,scrollbars=no,status=no');
|
||||||
|
|||||||
@@ -196,7 +196,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="well col-md-11 col-xs-12 pull-right">
|
<div class="well col-md-11 col-xs-12 pull-right hide">
|
||||||
<div class="topic-main-buttons pull-right inline-block hide">
|
<div class="topic-main-buttons pull-right inline-block hide">
|
||||||
<button class="btn btn-primary post_reply" type="button">[[topic:reply]]</button>
|
<button class="btn btn-primary post_reply" type="button">[[topic:reply]]</button>
|
||||||
<div class="btn-group thread-tools hide">
|
<div class="btn-group thread-tools hide">
|
||||||
|
|||||||
Reference in New Issue
Block a user