Loading src/app/common/services/horizontal-feed.service.ts +18 −9 Original line number Original line Diff line number Diff line Loading @@ -173,7 +173,7 @@ export class HorizontalFeedService { return { return { index: index, index: index, entity: this.entities.setCastToActivities(true).single(entity.urn), entity: this.entities.single(entity.urn), }; }; } } Loading Loading @@ -289,14 +289,15 @@ export class HorizontalFeedService { */ */ protected async _fetchContainer() { protected async _fetchContainer() { const baseEntity = this.baseEntity; const baseEntity = this.baseEntity; const baseEntityTimestamp = baseEntity.time_created * 1000; const guid = baseEntity.container_guid || baseEntity.owner_guid; const guid = baseEntity.container_guid || baseEntity.owner_guid; const endpoint = `api/v2/feeds/container/${guid}/all`; const endpoint = `api/v2/feeds/container/${guid}/all`; const params = { const params = { sync: 1, sync: 1, as_activities: 1, force_public: 1, force_public: 1, limit: this.limit, limit: this.limit, from_timestamp: baseEntityTimestamp, }; }; // TODO: Make this less convoluted // TODO: Make this less convoluted Loading @@ -305,22 +306,28 @@ export class HorizontalFeedService { ? this._fetchFromServer(endpoint, { ? this._fetchFromServer(endpoint, { ...params, ...params, reverse_sort: 1, reverse_sort: 1, from_timestamp: baseEntity.time_created * 1000 + 1, }) }) : Promise.resolve(null), : Promise.resolve(null), this.pools.next.moreData this.pools.next.moreData ? this._fetchFromServer(endpoint, { ? this._fetchFromServer(endpoint, params) ...params, from_timestamp: baseEntity.time_created * 1000 - 1, }) : Promise.resolve(null), : Promise.resolve(null), ]); ]); const baseGuids = [ this.baseEntity.guid, this.baseEntity.entity_guid, this.baseEntity.remind_object && this.baseEntity.remind_object.guid, this.baseEntity.remind_object && this.baseEntity.remind_object.entity_guid, ].filter(Boolean); let changed = false; let changed = false; if (prev !== null) { if (prev !== null) { this.pools.prev = { this.pools.prev = { entities: prev, entities: prev.filter( entity => entity.guid && !baseGuids.includes(entity.guid) ), moreData: false, moreData: false, }; }; Loading @@ -329,7 +336,9 @@ export class HorizontalFeedService { if (next !== null) { if (next !== null) { this.pools.next = { this.pools.next = { entities: next, entities: next.filter( entity => entity.guid && !baseGuids.includes(entity.guid) ), moreData: false, moreData: false, }; }; Loading src/app/modules/media/modal/modal.component.scss +4 −0 Original line number Original line Diff line number Diff line Loading @@ -175,6 +175,10 @@ m-overlay-modal { vertical-align: top; vertical-align: top; } } .m-mediaModal__media--image { object-fit: contain; } &.m-mediaModal__mediaWrapper--blog { &.m-mediaModal__mediaWrapper--blog { overflow-x: hidden; overflow-x: hidden; overflow-y: scroll; overflow-y: scroll; Loading src/app/modules/media/modal/modal.component.ts +4 −2 Original line number Original line Diff line number Diff line Loading @@ -713,8 +713,10 @@ export class MediaModalComponent implements OnInit, OnDestroy { // Dismiss modal when backdrop is clicked and modal is open // Dismiss modal when backdrop is clicked and modal is open @HostListener('document:click', ['$event']) @HostListener('document:click', ['$event']) clickedBackdrop($event) { clickedBackdrop($event) { if ($event) { $event.preventDefault(); $event.preventDefault(); $event.stopPropagation(); $event.stopPropagation(); } if (this.isOpen) { if (this.isOpen) { this.overlayModal.dismiss(); this.overlayModal.dismiss(); } } Loading Loading
src/app/common/services/horizontal-feed.service.ts +18 −9 Original line number Original line Diff line number Diff line Loading @@ -173,7 +173,7 @@ export class HorizontalFeedService { return { return { index: index, index: index, entity: this.entities.setCastToActivities(true).single(entity.urn), entity: this.entities.single(entity.urn), }; }; } } Loading Loading @@ -289,14 +289,15 @@ export class HorizontalFeedService { */ */ protected async _fetchContainer() { protected async _fetchContainer() { const baseEntity = this.baseEntity; const baseEntity = this.baseEntity; const baseEntityTimestamp = baseEntity.time_created * 1000; const guid = baseEntity.container_guid || baseEntity.owner_guid; const guid = baseEntity.container_guid || baseEntity.owner_guid; const endpoint = `api/v2/feeds/container/${guid}/all`; const endpoint = `api/v2/feeds/container/${guid}/all`; const params = { const params = { sync: 1, sync: 1, as_activities: 1, force_public: 1, force_public: 1, limit: this.limit, limit: this.limit, from_timestamp: baseEntityTimestamp, }; }; // TODO: Make this less convoluted // TODO: Make this less convoluted Loading @@ -305,22 +306,28 @@ export class HorizontalFeedService { ? this._fetchFromServer(endpoint, { ? this._fetchFromServer(endpoint, { ...params, ...params, reverse_sort: 1, reverse_sort: 1, from_timestamp: baseEntity.time_created * 1000 + 1, }) }) : Promise.resolve(null), : Promise.resolve(null), this.pools.next.moreData this.pools.next.moreData ? this._fetchFromServer(endpoint, { ? this._fetchFromServer(endpoint, params) ...params, from_timestamp: baseEntity.time_created * 1000 - 1, }) : Promise.resolve(null), : Promise.resolve(null), ]); ]); const baseGuids = [ this.baseEntity.guid, this.baseEntity.entity_guid, this.baseEntity.remind_object && this.baseEntity.remind_object.guid, this.baseEntity.remind_object && this.baseEntity.remind_object.entity_guid, ].filter(Boolean); let changed = false; let changed = false; if (prev !== null) { if (prev !== null) { this.pools.prev = { this.pools.prev = { entities: prev, entities: prev.filter( entity => entity.guid && !baseGuids.includes(entity.guid) ), moreData: false, moreData: false, }; }; Loading @@ -329,7 +336,9 @@ export class HorizontalFeedService { if (next !== null) { if (next !== null) { this.pools.next = { this.pools.next = { entities: next, entities: next.filter( entity => entity.guid && !baseGuids.includes(entity.guid) ), moreData: false, moreData: false, }; }; Loading
src/app/modules/media/modal/modal.component.scss +4 −0 Original line number Original line Diff line number Diff line Loading @@ -175,6 +175,10 @@ m-overlay-modal { vertical-align: top; vertical-align: top; } } .m-mediaModal__media--image { object-fit: contain; } &.m-mediaModal__mediaWrapper--blog { &.m-mediaModal__mediaWrapper--blog { overflow-x: hidden; overflow-x: hidden; overflow-y: scroll; overflow-y: scroll; Loading
src/app/modules/media/modal/modal.component.ts +4 −2 Original line number Original line Diff line number Diff line Loading @@ -713,8 +713,10 @@ export class MediaModalComponent implements OnInit, OnDestroy { // Dismiss modal when backdrop is clicked and modal is open // Dismiss modal when backdrop is clicked and modal is open @HostListener('document:click', ['$event']) @HostListener('document:click', ['$event']) clickedBackdrop($event) { clickedBackdrop($event) { if ($event) { $event.preventDefault(); $event.preventDefault(); $event.stopPropagation(); $event.stopPropagation(); } if (this.isOpen) { if (this.isOpen) { this.overlayModal.dismiss(); this.overlayModal.dismiss(); } } Loading