fixes bug with "show more in conversation" shown in the middle of the conversation

This commit is contained in:
Hannes Mannerheim 2015-03-29 23:38:45 +02:00
parent 4253bffebb
commit 5376a9954a

View File

@ -1330,7 +1330,9 @@ function findInReplyToStatusAndShow(q, qid,reply,only_first,onlyINreplyto) {
reply_found.css('opacity','1');
if(only_first && reply_found_reply_to.length>0) {
if(q.children('.view-more-container-top').length < 1) {
reply_found.before('<div class="view-more-container-top" data-trace-from="' + reply + '"><a>' + window.sL.viewMoreInConvBefore + '</a></div>');
if(q.children('.queet').prevAll('.hidden-conversation').length>0) {
q.prepend('<div class="view-more-container-top" data-trace-from="' + reply + '"><a>' + window.sL.viewMoreInConvBefore + '</a></div>');
}
}
findReplyToStatusAndShow(q, qid,qid,true);
}
@ -1362,9 +1364,11 @@ function findReplyToStatusAndShow(q, qid,this_id,only_first) {
}
if(only_first && reply_founds_reply.length>0) {
if(q.children('.view-more-container-bottom').length < 1) {
if(q.children('.queet').nextAll('.hidden-conversation').length>0) {
q.append('<div class="view-more-container-bottom" data-replies-after="' + qid + '"><a>' + window.sL.viewMoreInConvAfter + '</a></div>');
}
}
}
});
checkForHiddenConversationQueets(q, qid);