1
00:00:00,700 --> 00:00:04,480
In the last reading, we saw how to build up my message component.

2
00:00:04,630 --> 00:00:10,000
So I'm going to see how to build that better message that is pretty similar, but there is a small difference.

3
00:00:10,000 --> 00:00:11,110
So in how to do that.

4
00:00:11,830 --> 00:00:17,140
So the main message we can get if we get the message, but instead the message will be getting to props

5
00:00:17,320 --> 00:00:20,170
like as you can see in the outfit, we'll be sending two props.

6
00:00:20,170 --> 00:00:23,560
One of the messages one is the message and also the last message.

7
00:00:24,100 --> 00:00:26,890
So we have to open and we have to get both of those props.

8
00:00:29,900 --> 00:00:32,960
We're catching the last message as well as message.

9
00:00:36,580 --> 00:00:37,510
So once we do that.

10
00:00:41,110 --> 00:00:47,650
We have to build our new concern is first message by you, that means is that is the message.

11
00:00:47,650 --> 00:00:49,030
The first method of that is that.

12
00:00:50,050 --> 00:00:50,890
If you take that.

13
00:00:52,000 --> 00:00:55,180
So check that if it is not the last message.

14
00:00:59,800 --> 00:01:00,160
All.

15
00:01:03,070 --> 00:01:03,700
The last.

16
00:01:04,900 --> 00:01:08,110
Message, not send us user name.

17
00:01:12,820 --> 00:01:13,840
And not a constant.

18
00:01:16,930 --> 00:01:21,490
Message, not Senate, not in it.

19
00:01:24,920 --> 00:01:30,640
So with this logic, if it is not last message or if the last message sent to the name is not equals,

20
00:01:30,650 --> 00:01:35,790
the message sentences them, then it is that it is considered as the first message that certain children

21
00:01:35,810 --> 00:01:37,460
are born as we perform.

22
00:01:37,670 --> 00:01:42,080
Let also answer been bullied for something so whether we are checking whether it is the first message,

23
00:01:42,080 --> 00:01:43,220
whether he was or not.

24
00:01:43,790 --> 00:01:49,490
For now, once this is done, we can go to this, returned it and then we can have the message at all

25
00:01:49,670 --> 00:01:50,210
last name.

26
00:01:50,210 --> 00:01:50,960
As I say, I do not.

27
00:02:00,170 --> 00:02:04,640
So now we have to check whether it is the first message by the user or not, if it is the first message

28
00:02:04,640 --> 00:02:06,410
we have to put in a different way.

29
00:02:06,800 --> 00:02:07,870
It is not in the first.

30
00:02:07,880 --> 00:02:12,210
If it is not the first message, then will be did it in two different ways.

31
00:02:12,230 --> 00:02:14,060
One is whether it is a major or not?

32
00:02:14,090 --> 00:02:16,910
Or does the attachment a bit of simple plain text.

33
00:02:16,910 --> 00:02:19,190
So do that if.

34
00:02:20,120 --> 00:02:20,570
Is.

35
00:02:23,280 --> 00:02:32,400
First message by use it, if it is true, then this after that an operator, the code will be performing

36
00:02:33,120 --> 00:02:34,710
so articulate, which are the tentative.

37
00:02:39,570 --> 00:02:44,880
So this deal can be set of clothing, no need to have more than that.

38
00:02:45,630 --> 00:02:52,470
So yeah, this should return our David Glass name off message, our thought if the message has some,

39
00:02:53,010 --> 00:02:57,240
if the message you use it has some logo are not, then it should have a style.

40
00:02:59,360 --> 00:03:03,020
Style will be a JavaScript object, so we'll be using this.

41
00:03:05,630 --> 00:03:06,680
The background image.

42
00:03:07,730 --> 00:03:08,870
Is a complete new message.

43
00:03:09,140 --> 00:03:14,200
We don't have the user before, then we should know which user is stopping the message, so we'll be

44
00:03:14,220 --> 00:03:15,380
having a background image.

45
00:03:19,040 --> 00:03:21,390
It will be a message, not Senator.

46
00:03:25,060 --> 00:03:29,170
I don't imagine will be if the message of gender exists, then we'll be sending the United.

47
00:03:33,270 --> 00:03:35,520
You are a I'll be using the doughnut operator.

48
00:03:36,990 --> 00:03:42,900
You get the value of the message, don't send the message to send a drop of tough.

49
00:03:46,080 --> 00:03:46,410
So you.

50
00:03:48,500 --> 00:03:49,130
So with this.

51
00:03:50,960 --> 00:03:54,890
No, if it is the first time headed by the user, the component is very.

52
00:03:56,550 --> 00:03:58,230
And now, if it is not.

53
00:04:00,590 --> 00:04:06,440
Then what we have to do, we have to return the two ways of methods, one is whether it is imminent

54
00:04:06,440 --> 00:04:07,550
or whether it is not going to be.

55
00:04:07,940 --> 00:04:09,320
So I'm writing a book for that.

56
00:04:09,470 --> 00:04:11,420
The message has attachments.

57
00:04:15,410 --> 00:04:18,020
Then this block of port offer offered an operator should look.

58
00:04:22,500 --> 00:04:23,340
Attachments.

59
00:04:24,810 --> 00:04:26,280
Well, don't say anything about that.

60
00:04:27,820 --> 00:04:30,060
Message of attachments.

61
00:04:30,570 --> 00:04:31,180
Northland.

62
00:04:33,350 --> 00:04:34,460
In greater than zero.

63
00:04:39,080 --> 00:04:42,800
If it is true, then we'll be rendering the image component like.

64
00:04:44,590 --> 00:04:49,930
For the image, when we say email copy from the previous thing may be down to my image.

65
00:04:51,220 --> 00:04:52,210
My message tonight.

66
00:04:53,600 --> 00:04:53,940
Oh, yeah.

67
00:04:54,660 --> 00:04:59,910
So they image will be the message about attachment violent will be the fine source will be the same

68
00:05:00,210 --> 00:05:00,600
thing.

69
00:05:01,770 --> 00:05:06,870
And all the message would be same as that information, but style will be something different because

70
00:05:06,870 --> 00:05:07,920
this is their message.

71
00:05:07,950 --> 00:05:09,500
We have to do it in some different manner.

72
00:05:09,510 --> 00:05:11,310
We have to give some margin left and.

73
00:05:13,620 --> 00:05:16,110
Margin live if it is first message by user.

74
00:05:17,670 --> 00:05:19,350
Then we'll be giving four big sense.

75
00:05:23,150 --> 00:05:24,850
And giving 48 pixels.

76
00:05:30,650 --> 00:05:37,370
So, yeah, so this if that if that's the message we are using the this ternary operator will be using

77
00:05:37,370 --> 00:05:37,970
the message.

78
00:05:38,420 --> 00:05:43,200
If it is not the image, the message has no attachments, then we have to render the plain text.

79
00:05:43,910 --> 00:05:44,900
That is all we can do it.

80
00:05:46,220 --> 00:05:48,440
It is not then will be rendering a.

81
00:05:50,130 --> 00:05:53,700
Nom. with the message, we can use the same for every.

82
00:06:06,260 --> 00:06:09,050
So we have to change some styles that's.

83
00:06:09,740 --> 00:06:10,610
It should be left.

84
00:06:12,970 --> 00:06:13,870
And then margin.

85
00:06:15,330 --> 00:06:19,380
All right, we did it in the background color.

86
00:06:24,750 --> 00:06:27,120
Involved should be I'll give a support for that.

87
00:06:28,900 --> 00:06:30,090
CBC, ABC.

88
00:06:33,870 --> 00:06:35,770
Now for that, it should have a margin left.

89
00:06:39,950 --> 00:06:41,030
It is first method by.

90
00:06:42,320 --> 00:06:44,210
Then we leave for presents.

91
00:06:45,380 --> 00:06:46,670
Of margin left.

92
00:06:48,070 --> 00:06:50,230
Otherwise, you can simply have 48 victims.

93
00:06:53,220 --> 00:06:54,840
And then we'll be rendering the message.

94
00:06:55,560 --> 00:06:57,480
So I'll be doing their part.

95
00:07:02,690 --> 00:07:04,190
You know, I think that the mission is.

96
00:07:10,750 --> 00:07:13,210
So with this, we completed the bear message company.

97
00:07:13,610 --> 00:07:16,480
So now we are done with the message, my message company and a message from.

98
00:07:16,810 --> 00:07:21,700
We have also seen how to render their messages, whether it is only major plain text, and also to see

99
00:07:21,700 --> 00:07:26,800
whether it is the first message by the user in that group or not to render it in the customized way

100
00:07:26,800 --> 00:07:27,430
that we want.

101
00:07:28,000 --> 00:07:34,050
So after completing this, I said they have to create the read receipts function in field.

102
00:07:34,240 --> 00:07:37,750
And also the last thing that is remaining is the mind messages.

103
00:07:38,380 --> 00:07:45,220
So message form and message from like, as you can see now here we have to have a set input bar where

104
00:07:45,220 --> 00:07:49,270
we can send messages, start typing messages and the final step of that.

105
00:07:49,270 --> 00:07:50,530
This is the login form.

106
00:07:50,860 --> 00:07:53,310
So then see the remaining stuff in the next few days.
