File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,7 +134,8 @@ export class AppComponent implements OnInit, AfterViewInit {
134134 ) )
135135 ) . subscribe ( ( [ currentUrl , event ] : [ string , RouterEvent ] ) => {
136136 if ( event instanceof NavigationStart ) {
137- if ( ! ( currentUrl . startsWith ( '/entities' || getEditItemPageRoute ( ) ) || currentUrl . startsWith ( getWorkspaceItemModuleRoute ( ) ) || currentUrl . startsWith ( getWorkflowItemModuleRoute ( ) ) ) ) {
137+ const nextUrl = event . url ;
138+ if ( ! this . shouldSkipLoadingStatus ( currentUrl , nextUrl ) ) {
138139 distinctNext ( this . isRouteLoading$ , true ) ;
139140 }
140141 // distinctNext(this.isRouteLoading$, true);
@@ -177,4 +178,14 @@ export class AppComponent implements OnInit, AfterViewInit {
177178 } ) ;
178179 }
179180
181+ private shouldSkipLoadingStatus ( currentUrl : string , nextUrl : string ) : boolean {
182+ return ( currentUrl . startsWith ( '/entities' || getEditItemPageRoute ( ) ) && ! ( this . isAdministrativeEditItemPageRoute ( nextUrl , currentUrl ) ) )
183+ || currentUrl . startsWith ( getWorkspaceItemModuleRoute ( ) ) || currentUrl . startsWith ( getWorkflowItemModuleRoute ( ) ) ;
184+ }
185+
186+ private isAdministrativeEditItemPageRoute ( nextUrl : string , currentUrl : string ) : boolean {
187+ const editPageRegEx = / \/ ( e n t i t i e s \/ [ ^ \/ ] + | i t e m s ) \/ [ 0 - 9 a - f - ] { 36 } \/ e d i t (?: \/ .* ) ? $ / ;
188+ return editPageRegEx . test ( nextUrl ) && ! editPageRegEx . test ( currentUrl ) ;
189+ }
190+
180191}
You can’t perform that action at this time.
0 commit comments