Skip to content

Commit

Permalink
Remove dialog effects (#3972)
Browse files Browse the repository at this point in the history
* remove dialog effects

* remove dialog effects
  • Loading branch information
DenysVuika authored Jul 25, 2024
1 parent d9a0ce7 commit 1222bf7
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 61 deletions.
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module.exports = () => {
global: {
statements: 75,
branches: 65,
functions: 71,
functions: 70,
lines: 74
}
}
Expand Down
13 changes: 4 additions & 9 deletions projects/aca-shared/src/lib/services/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,7 @@ import { SearchQueryBuilderService, SharedLinksApiService, UploadService, FileUp
import { OverlayContainer } from '@angular/cdk/overlay';
import { ActivatedRoute, ActivationEnd, NavigationStart, Router } from '@angular/router';
import { filter, map } from 'rxjs/operators';
import {
AppStore,
CloseModalDialogsAction,
SetCurrentUrlAction,
SetRepositoryInfoAction,
SetUserProfileAction,
ResetSelectionAction
} from '@alfresco/aca-shared/store';
import { AppStore, SetCurrentUrlAction, SetRepositoryInfoAction, SetUserProfileAction, ResetSelectionAction } from '@alfresco/aca-shared/store';
import { ContentApiService } from './content-api.service';
import { RouterExtensionService } from './router.extension.service';
import { Store } from '@ngrx/store';
Expand All @@ -52,13 +45,15 @@ import { AcaMobileAppSwitcherService } from './aca-mobile-app-switcher.service';
import { ShellAppService } from '@alfresco/adf-core/shell';
import { AppSettingsService } from './app-settings.service';
import { UserProfileService } from './user-profile.service';
import { MatDialog } from '@angular/material/dialog';

@Injectable({
providedIn: 'root'
})
// After moving shell to ADF to core, AppService will implement ShellAppService
export class AppService implements ShellAppService, OnDestroy {
private notificationService = inject(NotificationService);
private matDialog = inject(MatDialog);
private ready: BehaviorSubject<boolean>;

ready$: Observable<boolean>;
Expand Down Expand Up @@ -136,7 +131,7 @@ export class AppService implements ShellAppService, OnDestroy {
this.alfrescoApiService.getInstance().on('error', (error: { status: number; response: any }) => {
if (error.status === 401 && !this.alfrescoApiService.isExcludedErrorListener(error?.response?.req?.url)) {
if (!this.authenticationService.isLoggedIn()) {
this.store.dispatch(new CloseModalDialogsAction());
this.matDialog.closeAll();

let redirectUrl = this.activatedRoute.snapshot.queryParams['redirectUrl'];
if (!redirectUrl) {
Expand Down
4 changes: 0 additions & 4 deletions projects/aca-shared/store/src/actions/app.actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ export class SetInfoDrawerStateAction implements Action {
constructor(public payload: boolean) {}
}

export class CloseModalDialogsAction implements Action {
readonly type = AppActionTypes.CloseModalDialogs;
}

export class SetRepositoryInfoAction implements Action {
readonly type = AppActionTypes.SetRepositoryInfo;

Expand Down
44 changes: 0 additions & 44 deletions projects/aca-shared/store/src/effects/dialog.effects.ts

This file was deleted.

1 change: 0 additions & 1 deletion projects/aca-shared/store/src/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export * from './actions/metadata-aspect.actions';
export * from './actions/template.actions';
export * from './actions/contextmenu.actions';

export * from './effects/dialog.effects';
export * from './effects/router.effects';
export * from './effects/snackbar.effects';

Expand Down
3 changes: 1 addition & 2 deletions projects/aca-shared/store/src/store.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@
import { NgModule } from '@angular/core';
import { EffectsModule } from '@ngrx/effects';
import { SnackbarEffects } from './effects/snackbar.effects';
import { DialogEffects } from './effects/dialog.effects';
import { RouterEffects } from './effects/router.effects';

@NgModule({
imports: [EffectsModule.forFeature([SnackbarEffects, DialogEffects, RouterEffects])]
imports: [EffectsModule.forFeature([SnackbarEffects, RouterEffects])]
})
export class SharedStoreModule {}

0 comments on commit 1222bf7

Please sign in to comment.