secure a sequence order of splitted twists sending

This commit is contained in:
Simon Grim 2018-10-21 06:04:01 +05:00
parent 42b1a6536b
commit 37fad362ee

View File

@ -2467,7 +2467,8 @@ function postSubmit(e, oldLastPostId) {
if (splitedPostsCount > 1) {
if (textArea.length < splitedPostsCount) {
//current part will be sent as reply to the previous part...
postData = $('<div data-id="' + lastPostId + '" data-screen-name="' + defaultScreenName
postData = $('<div data-id="' + (oldLastPostId + 1).toString() // (lastPostId - oldLastPostId) may be more than 1 because of an async nature of getting of the confirmation of sending
+ '" data-screen-name="' + defaultScreenName
+ '" data-reply-part-id="' + (splitedPostsCount - textArea.length).toString()
+ '"></div>');
}