File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ declare global {
14
14
15
15
class SkySearchUI {
16
16
static MAX_POSTS = 25 ;
17
+ static BACKLOG_WARNING = 50 ;
17
18
18
19
private postsEl : HTMLDivElement ;
19
20
private backlogEl : HTMLSpanElement ;
@@ -77,6 +78,7 @@ class SkySearchUI {
77
78
} else {
78
79
this . jetstream . stopStream ( ) ;
79
80
this . embeddingManager . purgeBacklog ( ) ;
81
+ this . updateBacklog ( ) ;
80
82
}
81
83
} ) ;
82
84
@@ -122,7 +124,11 @@ class SkySearchUI {
122
124
this . postsEl . lastElementChild ?. remove ( ) ;
123
125
}
124
126
}
125
- if ( this . embeddingManager . messageBacklog > 50 ) {
127
+ this . updateBacklog ( ) ;
128
+ }
129
+
130
+ private updateBacklog ( ) {
131
+ if ( this . embeddingManager . messageBacklog > SkySearchUI . BACKLOG_WARNING ) {
126
132
this . backlogEl . innerText = this . embeddingManager . messageBacklog
127
133
. toString ( ) ;
128
134
this . backlogToastEl . classList . remove ( "hidden" ) ;
You can’t perform that action at this time.
0 commit comments