Fix a lag bug of chat vanishing at the start, 'cause that's wrong.

This might break chat, but I'm sleepy, so you get it untested...
do the math yourself if it's wrong.
This commit is contained in:
Lirusaito
2019-04-13 03:09:12 -04:00
parent c78770138d
commit 5228451c9c
2 changed files with 4 additions and 6 deletions

View File

@@ -415,8 +415,10 @@ protected:
S32 removeChar(S32 pos);
void removeWord(bool prev);
S32 insert(const S32 pos, const LLWString &wstr, const BOOL group_with_next_op);
public:
S32 remove(const S32 pos, const S32 length, const BOOL group_with_next_op);
protected:
// Direct operations
S32 insertStringNoUndo(S32 pos, const LLWString &wstr); // returns num of chars actually inserted
S32 removeStringNoUndo(S32 pos, S32 length);

View File

@@ -1490,11 +1490,7 @@ void LLFloaterIMPanel::sessionInitReplyReceived(const LLUUID& session_id)
mVoiceChannel->updateSessionID(session_id);
mSessionInitialized = true;
//we assume the history editor hasn't moved at all since
//we added the starting session message
//so, we count how many characters to remove
S32 chars_to_remove = mHistoryEditor->getWText().length() - mSessionStartMsgPos;
mHistoryEditor->removeTextFromEnd(chars_to_remove);
mHistoryEditor->remove(mSessionStartMsgPos, sSessionStartString.size(), true);
//and now, send the queued msg
for (LLSD::array_iterator iter = mQueuedMsgsForInit.beginArray();