WEBVTT

00:00.280 --> 00:02.000
Hi everyone!

00:02.520 --> 00:07.600
This is the additional feature for the free service will be on three.

00:07.960 --> 00:12.720
Okay, when I built this application I completely forgot this feature.

00:13.080 --> 00:17.400
And actually it's very easy to build the wooden frame.

00:17.800 --> 00:25.360
Okay, so right now what we do we will look up the current user and friendly okay.

00:25.400 --> 00:29.200
And right now we need to find the frame and based on the user survey.

00:29.720 --> 00:31.720
And we need to check a little bit over here.

00:34.320 --> 00:34.800
Okay.

00:35.040 --> 00:39.760
And right here you you cannot unfriend yourself okay.

00:39.960 --> 00:40.640
For sure.

00:41.400 --> 00:44.360
And right here we need to check that is correct.

00:44.960 --> 00:45.280
Okay.

00:45.280 --> 00:48.440
Let me show you the check for read it later.

00:48.440 --> 00:49.480
Don't worry about us.

00:51.120 --> 00:56.040
If this is not the is correct we will throw the error.

00:56.760 --> 00:58.000
And after that we.

00:58.160 --> 01:01.640
We need to remove the frame in both sides.

01:01.680 --> 01:02.120
Okay.

01:02.960 --> 01:05.040
Because the A and B.

01:07.640 --> 01:09.160
It also happen.

01:09.160 --> 01:09.200
happy.

01:09.240 --> 01:09.600
All right.

01:09.640 --> 01:10.160
All right.

01:10.760 --> 01:11.200
Right.

01:11.400 --> 01:12.000
For a reason.

01:12.040 --> 01:13.720
We need to remove Posey.

01:14.280 --> 01:18.720
And we also want to remove the frame.

01:19.560 --> 01:20.040
Friend.

01:20.040 --> 01:23.000
Request model.

01:25.000 --> 01:25.480
Okay.

01:25.600 --> 01:28.760
Make sure we remove the friend request model.

01:29.240 --> 01:33.600
And we only remove the threat model with the standard will be accepted.

01:34.120 --> 01:34.480
Okay.

01:34.520 --> 01:39.360
Because when we accept friend request, the standard will be changed to accept.

01:39.640 --> 01:39.960
Okay.

01:40.000 --> 01:43.040
When we unfriend we want, it will remove us.

01:43.040 --> 01:44.000
All right.

01:44.040 --> 01:47.200
For that reason, we will put a wait over here.

01:49.640 --> 01:54.560
We will remove it both for reasons I will create or operator.

01:54.880 --> 01:58.720
And that is an array and boots like us.

01:59.760 --> 02:04.560
So and we will block the handle frame on friend.

02:05.880 --> 02:09.400
I will send the friend and the current user.

02:09.440 --> 02:09.920
Okay.

02:09.960 --> 02:13.240
Let's pause the video and paint a little bit.

02:13.280 --> 02:18.680
Why I say that all in the front end you will understand.

02:18.880 --> 02:21.640
And inside here I will call the target user id.

02:22.120 --> 02:27.800
Furthermore, A and B is a thread okay.

02:28.160 --> 02:32.800
The I11 friendly, one unfriendly.

02:32.840 --> 02:38.960
It means the target user in this case will be the dummy, right?

02:39.320 --> 02:40.120
The target.

02:42.560 --> 02:49.760
User and this is the full friendly will be the I right.

02:50.520 --> 02:54.440
So that is the job of the handle right.

02:54.480 --> 02:56.840
And let me show you the some helper function.

02:57.560 --> 02:59.880
Firstly is the check a frame.

03:01.280 --> 03:05.440
Okay I will go to the user service and create one more helper function.

03:06.080 --> 03:13.480
Call the check frame and remove the some id over here and it returns a boolean right.

03:14.040 --> 03:15.520
I will check something like that.

03:15.840 --> 03:20.240
I will find the user by user ID and select the frames.

03:20.560 --> 03:21.200
All right.

03:22.000 --> 03:29.990
And we to check a little bit over here I will map through the frame and convert the ID into a string

03:30.550 --> 03:31.110
and check.

03:31.150 --> 03:34.630
Include here okay, if it include.

03:35.710 --> 03:38.030
We are friends, right?

03:38.830 --> 03:42.790
And one more helper function will be to remove frame it.

03:42.790 --> 03:43.390
Very easy.

03:43.430 --> 03:47.110
We just need to move out from the array right?

03:47.670 --> 03:49.590
Please bool operator.

03:49.910 --> 03:50.550
It will.

03:52.750 --> 03:55.550
It will remove the element inside out.

03:55.590 --> 03:55.910
Right.

03:55.950 --> 03:56.230
Okay.

03:56.270 --> 04:02.110
For example like we have a right one two and three okay.

04:02.350 --> 04:09.910
When we want to pull the element we will use, when you want to remove the element, we will use the

04:10.070 --> 04:16.550
pull operator and specify the the ID we want to remove.

04:16.950 --> 04:17.390
Okay.

04:18.110 --> 04:24.790
So that about pull parameter and make sure we return a new thing okay.

04:24.830 --> 04:27.790
Right about two function over here.

04:28.470 --> 04:30.430
So that's for the video.

04:30.870 --> 04:33.350
And nice.

04:33.670 --> 04:35.030
So I hope you understand.
