aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Angular
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2021-01-30 21:19:52 +0200
committerSyndamia <kamen.d.mladenov@protonmail.com>2021-01-30 21:19:52 +0200
commit8a8d222c4e8263ae3f5dbd61cf7b1d5dcbcdaf5c (patch)
tree52d2ba3feb0efb14a7a0e46964d3fb7644d96b5c /src/DevHive.Angular
parentdf80b4929549a01602f47dc58feffa51a00ad609 (diff)
downloadDevHive-8a8d222c4e8263ae3f5dbd61cf7b1d5dcbcdaf5c.tar
DevHive-8a8d222c4e8263ae3f5dbd61cf7b1d5dcbcdaf5c.tar.gz
DevHive-8a8d222c4e8263ae3f5dbd61cf7b1d5dcbcdaf5c.zip
Fixed profile posts not loading on certain accounts; fixed time at which the posts are requested
Diffstat (limited to 'src/DevHive.Angular')
-rw-r--r--src/DevHive.Angular/src/app/components/profile/profile.component.ts8
1 files changed, 5 insertions, 3 deletions
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();
}
);