Skip to content
Snippets Groups Projects
Commit 13ebd313 authored by Lukas Mauß's avatar Lukas Mauß
Browse files

Remove useless code

parent 3b10b106
No related merge requests found
......@@ -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;
......
......@@ -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;
}
}
}
} */
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment