Release Shakeout (#655)
* Cleaned up some code. Fixed an issue on books with good table of contents not allowing line tracking (progress) from being saved. Changed Save to Defaults on light mode to be primary. * Fixed a bug where deleting reading items would not actually delete them * Fixed a bug where after ordering reading lists then deleting the order would be undone (develop) * Code cleanup
This commit is contained in:
parent
49c34e32da
commit
b197f6f334
8 changed files with 31 additions and 53 deletions
|
@ -58,7 +58,7 @@
|
|||
<button (click)="toggleClickToPaginate()" class="btn btn-icon" aria-labelledby="tap-pagination"><i class="fa fa-arrows-alt-h {{clickToPaginate ? 'icon-primary-color' : ''}}" aria-hidden="true"></i><span *ngIf="darkMode"> {{clickToPaginate ? 'On' : 'Off'}}</span></button>
|
||||
</div>
|
||||
<div class="row no-gutters justify-content-between">
|
||||
<button (click)="resetSettings()" class="btn btn-secondary col">Reset to Defaults</button>
|
||||
<button (click)="resetSettings()" class="btn btn-primary col">Reset to Defaults</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row no-gutters">
|
||||
|
|
|
@ -208,6 +208,7 @@ $primary-color: #0062cc;
|
|||
|
||||
.btn {
|
||||
&.btn-secondary {
|
||||
color: #6c757d;
|
||||
border-color: transparent;
|
||||
background-color: unset;
|
||||
|
||||
|
|
|
@ -285,6 +285,8 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
fromEvent(window, 'scroll')
|
||||
.pipe(debounceTime(200), takeUntil(this.onDestroy)).subscribe((event) => {
|
||||
if (this.isLoading) return;
|
||||
|
||||
// Highlight the current chapter we are on
|
||||
if (Object.keys(this.pageAnchors).length !== 0) {
|
||||
// get the height of the document so we can capture markers that are halfway on the document viewport
|
||||
const verticalOffset = this.scrollService.scrollPosition + (document.body.offsetHeight / 2);
|
||||
|
@ -292,11 +294,6 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
const alreadyReached = Object.values(this.pageAnchors).filter((i: number) => i <= verticalOffset);
|
||||
if (alreadyReached.length > 0) {
|
||||
this.currentPageAnchor = Object.keys(this.pageAnchors)[alreadyReached.length - 1];
|
||||
|
||||
if (!this.incognitoMode) {
|
||||
this.readerService.saveProgress(this.seriesId, this.volumeId, this.chapterId, this.pageNum, this.lastSeenScrollPartPath).pipe(take(1)).subscribe(() => {/* No operation */});
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
this.currentPageAnchor = '';
|
||||
}
|
||||
|
@ -322,7 +319,7 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
|
||||
return 0;
|
||||
});
|
||||
|
||||
|
||||
if (intersectingEntries.length > 0) {
|
||||
let path = this.getXPathTo(intersectingEntries[0]);
|
||||
if (path === '') { return; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue