@@ -228,13 +228,20 @@ class Pages extends LitElement {
228
228
) ;
229
229
} else if ( this . showAllPages && this . hasExtraPages ) {
230
230
this . filteredPages = [ ...this . textPages ! ] ;
231
- } else {
231
+ } else if ( ! this . dynamicPagesQuery ) {
232
232
this . filteredPages = [ ...this . collInfo ! . pages ] ;
233
233
}
234
234
235
235
this . totalPages = this . filteredPages . length ;
236
236
237
237
if ( this . dynamicPagesQuery ) {
238
+ if ( ! this . query ) {
239
+ const seedPages = this . collInfo ! . pages . filter ( ( x ) => x . isSeed ) ;
240
+ this . filteredPages = this . showAllPages
241
+ ? [ ...this . collInfo ! . pages ]
242
+ : seedPages ;
243
+ this . hasExtraPages = seedPages . length !== this . collInfo ! . pages . length ;
244
+ }
238
245
this . dynamicPageCount = 1 ;
239
246
await this . addDynamicPages ( ) ;
240
247
}
@@ -289,11 +296,16 @@ class Pages extends LitElement {
289
296
ts,
290
297
favIconUrl,
291
298
waczhash,
299
+ isSeed,
292
300
} of json . pages ) {
293
301
if ( knownPages . has ( id ) ) {
294
302
continue ;
295
303
}
296
304
305
+ if ( ! this . showAllPages && ! isSeed ) {
306
+ continue ;
307
+ }
308
+
297
309
let tsActual ;
298
310
299
311
if ( typeof ts === "string" ) {
@@ -353,11 +365,13 @@ class Pages extends LitElement {
353
365
this . flex = flex ;
354
366
this . textPages = pages ;
355
367
356
- this . hasExtraPages = Boolean (
357
- this . textPages &&
358
- this . collInfo ?. pages &&
359
- this . textPages . length > this . collInfo . pages . length ,
360
- ) ;
368
+ if ( ! this . dynamicPagesQuery ) {
369
+ this . hasExtraPages = Boolean (
370
+ this . textPages &&
371
+ this . collInfo ?. pages &&
372
+ this . textPages . length > this . collInfo . pages . length ,
373
+ ) ;
374
+ }
361
375
362
376
if ( this . collInfo ) {
363
377
this . dynamicPagesQuery = this . collInfo . canQueryPages || false ;
0 commit comments