diff --git a/client/src/app/gateways/repositories/mediafiles/mediafile-repository.service.ts b/client/src/app/gateways/repositories/mediafiles/mediafile-repository.service.ts index a37fe6b258..ac13c01c1a 100644 --- a/client/src/app/gateways/repositories/mediafiles/mediafile-repository.service.ts +++ b/client/src/app/gateways/repositories/mediafiles/mediafile-repository.service.ts @@ -11,7 +11,6 @@ import { Fieldsets } from 'src/app/site/services/model-request-builder'; import { TypedFieldset } from '../../../site/services/model-request-builder/model-request-builder.service'; import { BaseRepository } from '../base-repository'; import { MeetingMediafileRepositoryService } from '../meeting-mediafile/meeting-mediafile-repository.service'; -import { ProjectionRepositoryService } from '../projections/projection-repository.service'; import { RepositoryServiceCollectorService } from '../repository-service-collector.service'; import { MediafileAction } from './mediafile.action'; @@ -26,7 +25,6 @@ export class MediafileRepositoryService extends BaseRepository this.activeMeetingId; viewModel.getEnsuredActiveMeeting = (): ViewMeeting => this.activeMeetingService.meeting; - viewModel.getProjectedContentObjects = (): string[] => - this.projectionRepo.getViewModelList().map(p => p.content_object_id); viewModel.getMeetingMediafile = (): ViewMeetingMediafile => this.getMeetingMediafile(model); return viewModel; } diff --git a/client/src/app/gateways/repositories/meeting-mediafile/meeting-mediafile-repository.service.ts b/client/src/app/gateways/repositories/meeting-mediafile/meeting-mediafile-repository.service.ts index 5e775270f6..99cfefb0ed 100644 --- a/client/src/app/gateways/repositories/meeting-mediafile/meeting-mediafile-repository.service.ts +++ b/client/src/app/gateways/repositories/meeting-mediafile/meeting-mediafile-repository.service.ts @@ -5,7 +5,6 @@ import { ViewMeetingMediafile } from 'src/app/site/pages/meetings/pages/mediafil import { ActiveMeetingIdService } from '../../../site/pages/meetings/services/active-meeting-id.service'; import { BaseRepository } from '../base-repository'; -import { ProjectionRepositoryService } from '../projections/projection-repository.service'; import { RepositoryServiceCollectorService } from '../repository-service-collector.service'; @Injectable({ @@ -16,8 +15,7 @@ export class MeetingMediafileRepositoryService extends BaseRepository this.activeMeetingIdService.meetingId; - viewModel.getProjectedContentObjects = (): string[] => - this.projectionRepo.getViewModelList().map(p => p.content_object_id); return viewModel; } } diff --git a/client/src/app/site/pages/meetings/pages/mediafiles/view-models/view-mediafile.ts b/client/src/app/site/pages/meetings/pages/mediafiles/view-models/view-mediafile.ts index 051987cdaf..e8079fd69f 100644 --- a/client/src/app/site/pages/meetings/pages/mediafiles/view-models/view-mediafile.ts +++ b/client/src/app/site/pages/meetings/pages/mediafiles/view-models/view-mediafile.ts @@ -1,4 +1,4 @@ -import { Fqid, Id } from 'src/app/domain/definitions/key-types'; +import { Id } from 'src/app/domain/definitions/key-types'; import { HasProperties } from 'src/app/domain/interfaces/has-properties'; import { ViewMediafileMeetingUsageKey } from 'src/app/domain/models/mediafiles/mediafile.constants'; import { Meeting } from 'src/app/domain/models/meetings/meeting'; @@ -74,7 +74,6 @@ export class ViewMediafile extends BaseProjectableViewModel { */ public getEnsuredActiveMeetingId!: () => Id; public getEnsuredActiveMeeting!: () => ViewMeeting; - public getProjectedContentObjects!: () => Fqid[]; public getMeetingMediafile!: (meetingId?: Id) => ViewMeetingMediafile; public override canAccess(): boolean { @@ -87,11 +86,7 @@ export class ViewMediafile extends BaseProjectableViewModel { } return !this.getEnsuredActiveMeetingId(); - } else if ( - this.meeting_mediafiles.some( - mm => this.getProjectedContentObjects().indexOf(`meeting_mediafile/${mm.id}`) !== -1 - ) - ) { + } else if (this.meeting_mediafiles.some(mm => !!mm.projection_ids?.length)) { return true; } diff --git a/client/src/app/site/pages/meetings/pages/mediafiles/view-models/view-meeting-mediafile.ts b/client/src/app/site/pages/meetings/pages/mediafiles/view-models/view-meeting-mediafile.ts index eafa4db378..98dd2e5e58 100644 --- a/client/src/app/site/pages/meetings/pages/mediafiles/view-models/view-meeting-mediafile.ts +++ b/client/src/app/site/pages/meetings/pages/mediafiles/view-models/view-meeting-mediafile.ts @@ -1,4 +1,4 @@ -import { Fqid, Id } from 'src/app/domain/definitions/key-types'; +import { Id } from 'src/app/domain/definitions/key-types'; import { HasProperties } from 'src/app/domain/interfaces/has-properties'; import { ViewMediafileMeetingUsageKey } from 'src/app/domain/models/mediafiles/mediafile.constants'; import { PROJECTIONDEFAULT, ProjectiondefaultValue } from 'src/app/domain/models/projector/projection-default'; @@ -42,7 +42,6 @@ export class ViewMeetingMediafile extends BaseProjectableViewModel Id; - public getProjectedContentObjects!: () => Fqid[]; public override canAccess(): boolean { return this.getEnsuredActiveMeetingId() === this.meeting_id || !this.getEnsuredActiveMeetingId();