From 8a8d222c4e8263ae3f5dbd61cf7b1d5dcbcdaf5c Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 30 Jan 2021 21:19:52 +0200 Subject: Fixed profile posts not loading on certain accounts; fixed time at which the posts are requested --- .../src/app/components/profile/profile.component.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/DevHive.Angular/src/app/components/profile/profile.component.ts b/src/DevHive.Angular/src/app/components/profile/profile.component.ts index 1a3f0b8..d9f94e8 100644 --- a/src/DevHive.Angular/src/app/components/profile/profile.component.ts +++ b/src/DevHive.Angular/src/app/components/profile/profile.component.ts @@ -69,15 +69,17 @@ export class ProfileComponent implements OnInit { } else { this.showNoTechMsg = true; - this.finishUserLoading(); + this.loadPosts(); } } private loadPosts(): void { - this._feedService.getUserPostsRequest(this.user.userName, 1, '2021-01-29T21:35:30.977Z', 5).subscribe( + const now = new Date(); + now.setHours(now.getHours() + 2); // accounting for eastern europe timezone + + this._feedService.getUserPostsRequest(this.user.userName, 1, now.toISOString(), AppConstants.PAGE_SIZE).subscribe( (result: object) => { this.userPosts = Object.values(result)[0]; - console.log(this.userPosts); this.finishUserLoading(); } ); -- cgit v1.2.3