Skip to content

Commit e40e5d9

Browse files
committed
dont scroll chat when hidden message is inserted;
1 parent 97e2acc commit e40e5d9

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

www/scripts/sepiaFW.ui.build.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,9 +1594,11 @@ function sepiaFW_build_ui_build(){
15941594
var article = document.createElement('ARTICLE');
15951595
article.className = 'statusUpdate';
15961596
if (isErrorMessage){
1597+
//error message
15971598
article.className += ' errorMsg';
15981599
block.className += ' error';
15991600
}else{
1601+
//everything else is status message
16001602
block.className += ' info';
16011603
if (!SepiaFW.ui.showChannelStatusMessages){
16021604
block.className += ' hidden-by-settings';

www/scripts/sepiaFW.ui.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,13 +1518,17 @@ function sepiaFW_build_ui(){
15181518
var paneNbr = resultView.paneNumber;
15191519

15201520
if (paneNbr == 1){
1521+
if (!skipAnimation && ((entryData.className.indexOf("hidden") >= 0) || window.getComputedStyle(entryData, null).getPropertyValue("display") == "none")){
1522+
skipAnimation = true; //force skip
1523+
}
15211524
UI.insertEle(target, entryData, skipAnimation);
15221525
//remove old message(s)?
15231526
var $allMessages = $target.find('.chatMsg').filter(":visible");
15241527
if (UI.maxChatMessages && UI.maxChatMessages <= $allMessages.length){
15251528
//remove old:
15261529
//$allMessages.slice(0, UI.maxChatMessages).hide();
15271530
$allMessages.first().hide();
1531+
//remove status message as well if first now? ... if its a day/date tag it should stay until directly followed by next day tag
15281532
}
15291533
if (!skipAnimation){
15301534
UI.scrollToBottom(target);

0 commit comments

Comments
 (0)