Browse Source

Clean up

pull/6470/head
Thomas Kaul 4 weeks ago
parent
commit
329b21a428
  1. 12
      apps/client/src/app/components/admin-platform/admin-platform.component.ts

12
apps/client/src/app/components/admin-platform/admin-platform.component.ts

@ -2,7 +2,6 @@ import { UserService } from '@ghostfolio/client/services/user/user.service';
import { CreatePlatformDto, UpdatePlatformDto } from '@ghostfolio/common/dtos';
import { ConfirmationDialogType } from '@ghostfolio/common/enums';
import { getLocale } from '@ghostfolio/common/helper';
import { User } from '@ghostfolio/common/interfaces';
import { GfEntityLogoComponent } from '@ghostfolio/ui/entity-logo';
import { NotificationService } from '@ghostfolio/ui/notifications';
import { AdminService, DataService } from '@ghostfolio/ui/services';
@ -63,7 +62,6 @@ export class GfAdminPlatformComponent implements OnDestroy, OnInit {
public deviceType: string;
public displayedColumns = ['name', 'url', 'accounts', 'actions'];
public platforms: Platform[];
public user: User;
private unsubscribeSubject = new Subject<void>();
@ -102,16 +100,6 @@ export class GfAdminPlatformComponent implements OnDestroy, OnInit {
public ngOnInit() {
this.deviceType = this.deviceService.getDeviceInfo().deviceType;
this.userService.stateChanged
.pipe(takeUntil(this.unsubscribeSubject))
.subscribe((state) => {
if (state?.user) {
this.user = state.user;
this.changeDetectorRef.markForCheck();
}
});
this.fetchPlatforms();
}

Loading…
Cancel
Save