From 13ebd31368cf782fe90e88735863a83d196417d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de> Date: Thu, 21 Mar 2019 10:47:15 +0100 Subject: [PATCH] Remove useless code --- .../comment-list/comment-list.component.ts | 1 - .../shared/comment/comment.component.ts | 20 ------------------- 2 files changed, 21 deletions(-) diff --git a/src/app/components/shared/comment-list/comment-list.component.ts b/src/app/components/shared/comment-list/comment-list.component.ts index 379d71db5..b906f3653 100644 --- a/src/app/components/shared/comment-list/comment-list.component.ts +++ b/src/app/components/shared/comment-list/comment-list.component.ts @@ -62,7 +62,6 @@ export class CommentListComponent implements OnInit { for (let i = 0; i < this.comments.length; i++) { if (payload.id === this.comments[i].id) { for (const [key, value] of Object.entries(payload.changes)) { - console.log(value); switch (key) { case 'read': this.comments[i].read = value; break; diff --git a/src/app/components/shared/comment/comment.component.ts b/src/app/components/shared/comment/comment.component.ts index 35776dec4..614ba1967 100644 --- a/src/app/components/shared/comment/comment.component.ts +++ b/src/app/components/shared/comment/comment.component.ts @@ -38,17 +38,14 @@ export class CommentComponent implements OnInit { setRead(comment: Comment): void { this.comment = this.wsCommentService.toggleRead(comment); - // this.commentService.updateComment(comment).subscribe(); } setCorrect(comment: Comment): void { this.comment = this.wsCommentService.toggleCorrect(comment); - // this.commentService.updateComment(comment).subscribe(); } setFavorite(comment: Comment): void { this.comment = this.wsCommentService.toggleFavorite(comment); - // this.commentService.updateComment(comment).subscribe(); } delete(comment: Comment): void { @@ -56,21 +53,4 @@ export class CommentComponent implements OnInit { this.notification.show(`Comment '${comment.body}' successfully deleted.`); }); } - /* - parseIncomingMessage(message: Message) { - const msg = JSON.parse(message.body); - const payload = msg.payload; - if (payload.id === this.comment.id) { - for (const [key, value] of Object.entries(payload.changes)) { - console.log(value); - switch (key) { - case 'read': this.comment.read = value; - break; - case 'correct' : this.comment.correct = value; - break; - case 'favorite' : this.comment.favorite = value; - } - } - } - } */ } -- GitLab