mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-09 05:09:39 +00:00
Fix request loop on settings page
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Component, ElementRef, EventEmitter, HostBinding, HostListener, OnInit, Output, QueryList, ViewChild, ViewChildren } from '@angular/core'
|
||||
import { Router } from '@angular/router'
|
||||
|
||||
import { sortBy } from 'lodash'
|
||||
import { SettingsService } from 'src-angular/app/core/services/settings.service'
|
||||
@@ -27,7 +28,8 @@ export class ResultTableComponent implements OnInit {
|
||||
constructor(
|
||||
public searchService: SearchService,
|
||||
private selectionService: SelectionService,
|
||||
public settingsService: SettingsService
|
||||
public settingsService: SettingsService,
|
||||
private router: Router,
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
@@ -95,7 +97,7 @@ export class ResultTableComponent implements OnInit {
|
||||
}
|
||||
tableScrolled(): void {
|
||||
const table = this.resultTableDiv.nativeElement
|
||||
if (table.scrollHeight - (table.scrollTop + table.clientHeight) < 100) {
|
||||
if (this.router.url === '/browse' && table.scrollHeight - (table.scrollTop + table.clientHeight) < 100) {
|
||||
// Scrolled near the bottom of the table
|
||||
if (this.searchService.areMorePages && !this.searchService.searchLoading) {
|
||||
this.searchService.search(this.searchService.searchControl.value || '*', true).subscribe()
|
||||
|
||||
Reference in New Issue
Block a user