History

Fix typing indicator keypress lag and self bubbles option

Ada committed 1 year ago

Commit fe163311 parent ad2b1522 files · +6 −6Browse files

Showing the changes to scripts/communityScripts (2 of 2 files). Show all

Unified · Split

2 files
  1. scripts/communityScripts/armored-chat/armored_chat.qml +5 −5
  2. scripts/communityScripts/chatBubbles.js +1 −1
scripts/communityScripts/armored-chat/armored_chat.qml+5−5
@@ -230,13 +230,13 @@ Rectangle { · 229 unmodified lines
230230 event.accepted = true;
231231 toScript({type: "send_message", message: text, channel: pageVal});
232232 text = ""
233+ }
234+ }
235+ onTextChanged: {
236+ if (text === "") {
233237 toScript({type: "action", action: "end_typing"});
234238 } else {
235− if (text === "" || (event.key === Qt.Key_Backspace && text.length === 1)) {
236− toScript({type: "action", action: "end_typing"});
237− } else {
238− toScript({type: "action", action: "start_typing"});
239− }
239+ toScript({type: "action", action: "start_typing"});
240240 }
241241 }
242242 onFocusChanged: {
scripts/communityScripts/chatBubbles.js+1−1
@@ -134,7 +134,7 @@ function ChatBubbles_RecvMsg(channel, msg, senderID, localOnly) { · 133 unmodified lines
134134 if (channel !== CHAT_CHANNEL && channel !== TYPING_NOTIFICATION_CHANNEL) { return; }
135135
136136 // don't spawn bubbles for MyAvatar if the setting is disabled
137− //if (!SELF_BUBBLES && (senderID === MyAvatar.sessionID || !MyAvatar.sessionID)) { return; }
137+ if (!SELF_BUBBLES && (senderID === MyAvatar.sessionUUID || !MyAvatar.sessionUUID)) { return; }
138138
139139 let data;
140140 try {