File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1757,15 +1757,15 @@ function roomIsReady() {
17571757
17581758function updateChatEmptyNotice ( ) {
17591759 const chatLists = [
1760- getId ( 'chatPublicMessages' ) ,
1761- getId ( 'chatPrivateMessages' ) ,
17621760 getId ( 'chatGPTMessages' ) ,
17631761 getId ( 'deepSeekMessages' ) ,
1764- ] ;
1762+ getId ( 'chatPublicMessages' ) ,
1763+ getId ( 'chatPrivateMessages' ) ,
1764+ ] . filter ( Boolean ) ;
17651765 const emptyNotice = getId ( 'chatEmptyNotice' ) ;
17661766 if ( ! emptyNotice ) return ;
1767- const hasMessages = chatLists . some ( ( ul ) => ul && ul . children . length > 0 ) ;
1768- emptyNotice . style . display = hasMessages ? 'none' : '' ;
1767+ const hasMessages = chatLists . some ( ( ul ) => ul . children . length > 0 ) ;
1768+ hasMessages ? emptyNotice . classList . add ( 'hidden' ) : emptyNotice . classList . remove ( 'hidden' ) ;
17691769}
17701770
17711771function elemDisplay ( elem , display , mode = 'block' ) {
Original file line number Diff line number Diff line change @@ -5578,7 +5578,6 @@ class RoomClient {
55785578 if ( result . isConfirmed ) {
55795579 this . getId ( id ) . remove ( ) ;
55805580 this . sound ( 'delete' ) ;
5581- // Update empty chat notice after deleting a message
55825581 updateChatEmptyNotice ( ) ;
55835582 }
55845583 } ) ;
@@ -5790,6 +5789,7 @@ class RoomClient {
57905789 this . chatMessages = [ ] ;
57915790 this . chatGPTContext = [ ] ;
57925791 this . deepSeekContext = [ ] ;
5792+ updateChatEmptyNotice ( ) ;
57935793 this . sound ( 'delete' ) ;
57945794 }
57955795 } ) ;
You can’t perform that action at this time.
0 commit comments