(animation = true, path = false, content = false, keepScroll = false, mainPath = false, fromGoBack = false, notAutomaticBrowsing = false, fromSetOfflineMode = false, fromGoForwards = false)
| 562 | var currentPath = false, currentPathScrollTop = []; |
| 563 | |
| 564 | async function loadIndexPage(animation = true, path = false, content = false, keepScroll = false, mainPath = false, fromGoBack = false, notAutomaticBrowsing = false, fromSetOfflineMode = false, fromGoForwards = false) |
| 565 | { |
| 566 | onReading = _onReading = false; |
| 567 | |
| 568 | fileManager.revokeAllObjectURL(); |
| 569 | reading.render.revokeAllObjectURL(); |
| 570 | workers.clean('convertImage'); |
| 571 | |
| 572 | scroll.reset(); |
| 573 | reading.hideContent(); |
| 574 | reading.music.pause(); |
| 575 | |
| 576 | setWindowTitle(); |
| 577 | |
| 578 | const isOpds = fileManager.isOpds(path); |
| 579 | |
| 580 | currentPathScrollTop[currentPath === false ? 0 : currentPath] = isOpds ? template.contentRight().find('.opds-browse-content').scrollTop() : template.contentRight().children().scrollTop(); |
| 581 | |
| 582 | for(let _path in currentPathScrollTop) |
| 583 | { |
| 584 | if(_path != 0 && !new RegExp('^'+pregQuote(_path)).test(path)) |
| 585 | delete currentPathScrollTop[_path]; |
| 586 | } |
| 587 | |
| 588 | if(currentPathScrollTop[path === false ? 0 : path]) |
| 589 | keepScroll = currentPathScrollTop[path === false ? 0 : path]; |
| 590 | |
| 591 | const _indexLabel = prevIndexLabel = (indexLabel || {}); |
| 592 | indexLabel = false; |
| 593 | |
| 594 | currentPath = path; |
| 595 | |
| 596 | handlebarsContext.serverLastError = false; |
| 597 | |
| 598 | let contentRightIndex = template.contentRightIndex(); |
| 599 | |
| 600 | if(_indexLabel.opds || isOpds) |
| 601 | { |
| 602 | if(!template._contentLeft().querySelector('.menu-list')) |
| 603 | dom.loadIndexContentLeft(animation); |
| 604 | |
| 605 | if(!path) |
| 606 | { |
| 607 | dom.fromLibrary(true); |
| 608 | dom.indexPathControl(false); |
| 609 | |
| 610 | generateAppMenu(); |
| 611 | |
| 612 | dom.setCurrentPageVars('index', _indexLabel); |
| 613 | dom.floatingActionButton(false); |
| 614 | |
| 615 | handlebarsContext.headerTitle = false; |
| 616 | handlebarsContext.headerTitlePath = false; |
| 617 | |
| 618 | // OPDS |
| 619 | await opds.home(); |
| 620 | } |
| 621 | else |
no test coverage detected