I have choosen the bell icon:
fa fa-times-rectangle fa fa-exclamation-triangle fa fa-check fa fa-remove
fa fa-bell-slash fa fa-bell-o
fa fa-heart fa fa-heartbeat
Now we are showing all the messages and we show two icons: one to mark the message as offensive and another one to unmark it. Wrong!
The point is that we only need to show the mark icon (when the message is not offensive) and the unmark icon (when it is).
Ok, now we have the list of messages: this.messages = res.body; in line 302: home.component.ts
We need to Loop all those messages and then show if each of them is offensive or not, so you will have to use the offensiveMessageService and then make a NgIf to show one icon or the other depending on that condition.
Note: One message can have many offensive messages, but we are interested only in the one that has been marked by that user (not on the others which will be used by an admin to quit a user from a ChatRoom)
Hi again,
The icon should be refresh when the state changes.
Thanks.
Hi,
Please, can you help me to change the mark/unmark icon. I am using a ...|... to mark (right) and | unmark a message as offensive.
I've put the code in the branch: offmsg (here: https://github.com/Tonterias/spingularchatsql6/commit/2fd05bf05299a2a5819b048263d6e8f2b1dd156c#diff-489255e12eb2f6d93ec3076b8da30f8bR214)
I have choosen the bell icon: fa fa-times-rectangle fa fa-exclamation-triangle fa fa-check fa fa-remove fa fa-bell-slash fa fa-bell-o fa fa-heart fa fa-heartbeat
Now we are showing all the messages and we show two icons: one to mark the message as offensive and another one to unmark it. Wrong!
https://github.com/Tonterias/spingularchatsql6/commit/2fd05bf05299a2a5819b048263d6e8f2b1dd156c#diff-2f2f2fefb6978840f85244f28b53f3a1L321
The point is that we only need to show the mark icon (when the message is not offensive) and the unmark icon (when it is).
Ok, now we have the list of messages: this.messages = res.body; in line 302: home.component.ts
We need to Loop all those messages and then show if each of them is offensive or not, so you will have to use the offensiveMessageService and then make a NgIf to show one icon or the other depending on that condition.
Note: One message can have many offensive messages, but we are interested only in the one that has been marked by that user (not on the others which will be used by an admin to quit a user from a ChatRoom)