Inline reply work for threaded lists in realtime

This commit is contained in:
Brion Vibber
2011-03-01 16:04:11 -08:00
parent 5d6b9936c2
commit 9fd2ee86f3
4 changed files with 20 additions and 6 deletions

View File

@@ -654,8 +654,13 @@ var SN = { // StatusNet
var orig_li = $('li', data)[0];
if (orig_li) {
var li = document._importNode(orig_li, true);
replyItem.replaceWith(li);
SN.U.NoticeInlineReplyPlaceholder(parentNotice);
if ($("#notice-"+id).length == 0) {
replyItem.replaceWith(li);
SN.U.NoticeInlineReplyPlaceholder(parentNotice);
} else {
// Realtime came through before us...
replyItem.remove();
}
}
}
});