Skip to content

Commit

Permalink
Merge pull request overte-org#1106 from Armored-Dragon/fix/ArmoredCha…
Browse files Browse the repository at this point in the history
…t-Scrolling

[ArmoredChat] Alleviate scrolling issue
  • Loading branch information
ksuprynowicz authored Aug 18, 2024
2 parents a97b892 + f222323 commit eb168e4
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions scripts/communityScripts/armored-chat/armored_chat.qml
Original file line number Diff line number Diff line change
Expand Up @@ -487,13 +487,17 @@ Rectangle {
var last_item_index = channel.count - 1;
var last_item = channel.get(last_item_index);

if (last_message_user === username && elapsed_minutes < 1 && last_item){
message = "<br>" + message
last_item.text = last_item.text += "\n" + message;
scrollToBottom()
last_message_time = new Date();
return;
}
// FIXME: When adding a new message this would check to see if we could append the incoming message
// to the bottom of the last message. This current implimentation causes issues with scrollToBottom()
// Specifically, scrolling to the bottom does not like image embeds.
// This needs to be reworked entirely before it can be reimplimented
// if (last_message_user === username && elapsed_minutes < 1 && last_item){
// message = "<br>" + message
// last_item.text = last_item.text += "\n" + message;
// scrollToBottom()
// last_message_time = new Date();
// return;
// }

last_message_user = username;
last_message_time = new Date();
Expand Down

0 comments on commit eb168e4

Please sign in to comment.