Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

chore(frontend:sync): replace deprecated `getCurrentNavigation` with `currentNavigation` for route state handling

johaven573cc6751cfe
diff --git a/frontend/src/app/applications/sync/components/sync-clients.component.ts b/frontend/src/app/applications/sync/components/sync-clients.component.ts
index f200688c..55825d10 100644
--- a/frontend/src/app/applications/sync/components/sync-clients.component.ts
+++ b/frontend/src/app/applications/sync/components/sync-clients.component.ts
@@ -80,7 +80,7 @@ export class SyncClientsComponent {
translating: true,
sameLink: true
})
- const routeState = this.router.getCurrentNavigation()?.extras.state as { clientId: string; pathId?: number }
+ const routeState = this.router.currentNavigation()?.extras.state as { clientId: string; pathId?: number }
if (routeState?.clientId) {
this.focusOnSelectId = routeState.clientId
this.focusOnSelectPathId = routeState.pathId
diff --git a/frontend/src/app/applications/sync/components/sync-paths.component.ts b/frontend/src/app/applications/sync/components/sync-paths.component.ts
index 3da1e345..a6786598 100644
--- a/frontend/src/app/applications/sync/components/sync-paths.component.ts
+++ b/frontend/src/app/applications/sync/components/sync-paths.component.ts
@@ -335,7 +335,7 @@ export class SyncPathsComponent implements OnInit, OnDestroy {
}
private checkRouteState() {
- const routeState = this.router.getCurrentNavigation()?.extras.state as { id: number; withSettings: boolean }
+ const routeState = this.router.currentNavigation()?.extras.state as { id: number; withSettings: boolean }
if (routeState?.id) {
this.focusOnPathId = routeState.id
this.focusOnPathSettings = routeState.withSettings
diff --git a/frontend/src/app/applications/sync/components/sync-transfers.component.ts b/frontend/src/app/applications/sync/components/sync-transfers.component.ts
index c828ecea..96566566 100644
--- a/frontend/src/app/applications/sync/components/sync-transfers.component.ts
+++ b/frontend/src/app/applications/sync/components/sync-transfers.component.ts
@@ -195,7 +195,7 @@ export class SyncTransfersComponent {
}
private checkRouteState() {
- const routeState = this.router.getCurrentNavigation()?.extras.state as { id: number; withSettings: boolean }
+ const routeState = this.router.currentNavigation()?.extras.state as { id: number; withSettings: boolean }
if (routeState?.id) {
this.focusOnSyncPathErrorsId = routeState.id
}
diff --git a/frontend/src/app/applications/sync/components/wizard/sync-wizard-client.component.ts b/frontend/src/app/applications/sync/components/wizard/sync-wizard-client.component.ts
index 7be4534e..a76e2d66 100644
--- a/frontend/src/app/applications/sync/components/wizard/sync-wizard-client.component.ts
+++ b/frontend/src/app/applications/sync/components/wizard/sync-wizard-client.component.ts
@@ -43,7 +43,7 @@ export class SyncWizardClientComponent {
if (this.syncService.wizard.localPath) {
this.checkSelection()
}
- const routeState = this.router.getCurrentNavigation()?.extras.state as { file: FileModel }
+ const routeState = this.router.currentNavigation()?.extras.state as { file: FileModel }
if (routeState?.file) {
this.syncService.addFileToRemotePath(routeState.file)
}