diff --git a/apps/red-ui/src/app/modules/projects/screens/file-preview-screen/file-preview-screen.component.ts b/apps/red-ui/src/app/modules/projects/screens/file-preview-screen/file-preview-screen.component.ts index d3b3269b9..5623b6425 100644 --- a/apps/red-ui/src/app/modules/projects/screens/file-preview-screen/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/modules/projects/screens/file-preview-screen/file-preview-screen.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectorRef, Component, HostListener, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { AppStateService } from '../../../../state/app-state.service'; import { WebViewerInstance } from '@pdftron/webviewer'; import { PdfViewerComponent } from '../../components/pdf-viewer/pdf-viewer.component'; diff --git a/apps/red-ui/src/app/modules/projects/screens/project-listing-screen/project-listing-screen.component.ts b/apps/red-ui/src/app/modules/projects/screens/project-listing-screen/project-listing-screen.component.ts index 204dcd3a0..8ff5697e1 100644 --- a/apps/red-ui/src/app/modules/projects/screens/project-listing-screen/project-listing-screen.component.ts +++ b/apps/red-ui/src/app/modules/projects/screens/project-listing-screen/project-listing-screen.component.ts @@ -1,5 +1,5 @@ import { Component, Injector, OnDestroy, OnInit, ViewChild } from '@angular/core'; -import { FileManagementControllerService, Project, RuleSetModel } from '@redaction/red-ui-http'; +import { Project, RuleSetModel } from '@redaction/red-ui-http'; import { AppStateService } from '../../../../state/app-state.service'; import { UserService } from '../../../../services/user.service'; import { DoughnutChartConfig } from '../../../shared/components/simple-doughnut-chart/simple-doughnut-chart.component'; @@ -38,8 +38,6 @@ export class ProjectListingScreenComponent extends BaseListingComponent { await this._appStateService.loadAllProjects(); @@ -103,7 +99,7 @@ export class ProjectListingScreenComponent extends BaseListingComponent { - this._appStateService.activateProject(params.projectId); - this._loadEntitiesFromState(); - }); + this._loadEntitiesFromState(); this._appStateService.fileChanged.subscribe(() => { this.calculateData(); @@ -101,11 +93,11 @@ export class ProjectOverviewScreenComponent extends BaseListingComponent events instanceof NavigationStart || events instanceof NavigationEnd)).subscribe((event) => { - if (event instanceof NavigationStart && !event.url.endsWith(this.appStateService.activeProjectId)) { + if (event instanceof NavigationStart && !event.url.endsWith(this._appStateService.activeProjectId)) { this._lastScrollPosition = this._scrollBar.getOffsetToRenderedContentStart() + this._scrollBar.getRenderedRange().end; } - if (event instanceof NavigationEnd && event.url.endsWith(this.appStateService.activeProjectId)) { + if (event instanceof NavigationEnd && event.url.endsWith(this._appStateService.activeProjectId)) { this._scrollBar.scrollTo({ top: this._lastScrollPosition }); } }); @@ -157,7 +149,7 @@ export class ProjectOverviewScreenComponent extends BaseListingComponent