ActivityPub-federated video streaming platform using P2P directly in your web browser
Prevent URL change on default route
Chocobozzz37da276f9c8d
diff --git a/client/src/app/+video-list/videos-list-all.component.ts b/client/src/app/+video-list/videos-list-all.component.tsindex 57ce150328..1f089af76d 100644--- a/client/src/app/+video-list/videos-list-all.component.ts+++ b/client/src/app/+video-list/videos-list-all.component.ts@@ -39,8 +39,9 @@ export class VideosListAllComponent implements OnInit, OnDestroy, DisableForReusprivate routeSub: SubscriptionngOnInit () {- this.defaultSort = '-publishedAt'- this.defaultScope = 'federated'+ const queryParams = this.route.snapshot.queryParams+ this.defaultSort = queryParams.sort || '-publishedAt'+ this.defaultScope = queryParams.scope || 'federated'this.routeSub = this.route.params.subscribe(() => this.update())}diff --git a/client/src/app/core/routing/redirect.service.ts b/client/src/app/core/routing/redirect.service.tsindex c88b77ad56..f57bd2b08d 100644--- a/client/src/app/core/routing/redirect.service.ts+++ b/client/src/app/core/routing/redirect.service.ts@@ -106,7 +106,7 @@ export class RedirectService {this.redirectingToHomepage = true- logger.info(`Redirecting to ${this.defaultRoute}...`)+ logger.info(`Redirecting to default route ${this.defaultRoute}...`, { skipLocationChange })this.router.navigateByUrl(this.defaultRoute, { skipLocationChange }).then(() => this.redirectingToHomepage = false)diff --git a/client/src/app/shared/shared-video-miniature/video-filters.model.ts b/client/src/app/shared/shared-video-miniature/video-filters.model.tsindex 9181bc7a2b..36576743d4 100644--- a/client/src/app/shared/shared-video-miniature/video-filters.model.ts+++ b/client/src/app/shared/shared-video-miniature/video-filters.model.ts@@ -50,10 +50,10 @@ export class VideoFilters {private nsfwFlagsBlurred: numberprivate defaultValues = new Map<keyof VideoFilters, any>([- [ 'sort', '-publishedAt' ],+ [ 'sort', undefined ],[ 'languageOneOf', undefined ],[ 'categoryOneOf', undefined ],- [ 'scope', 'federated' ],+ [ 'scope', undefined ],[ 'allVideos', false ],[ 'live', 'both' ],[ 'search', '' ]@@ -95,6 +95,9 @@ export class VideoFilters {if (noChanges) return+ console.log(currentFormObjectString)+ console.log(this.oldFormObjectString)+this.oldFormObjectString = currentFormObjectStringfor (const cb of this.onChangeCallbacks) {