# User Setting Page (2.3)

## User's Own Profile Setting Page

<figure><img src="https://2352509137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX0mOAVWkotGme0iRzu%2Fuploads%2FhTJLYp4TuYfrXaVRgLff%2FScreenshot%202566-02-22%20at%2012.09.21.png?alt=media&#x26;token=f46695fa-08ea-481f-8358-4ba689bab470" alt=""><figcaption></figcaption></figure>

| Feature      | Description                                                                                                                                           |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Edit profile | Will redirect to [User profile edit page](https://docs.social.plus/social-plus-uikit/uikit-3/ios/community/components/user-profile-edit) when clicked |

## Other User's profile setting page

There are 2 main state based on the user connection:

#### If user is already connect with the target user

<figure><img src="https://2352509137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX0mOAVWkotGme0iRzu%2Fuploads%2FMA1LTlBYiwM42fWulLoj%2FScreenshot%202566-02-22%20at%2012.10.37.png?alt=media&#x26;token=c4aea12a-04ee-4b0e-b7be-3daed04c659e" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
In version 2.2, we do not have the User notification setting in the menu.
{% endhint %}

#### If user is not connected with the target user

<figure><img src="https://2352509137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX0mOAVWkotGme0iRzu%2Fuploads%2FqExdZCt3Ov2hvuitCZib%2FScreenshot%202566-02-22%20at%2012.12.26.png?alt=media&#x26;token=06d5ad7b-9c94-408c-bdb4-1385b5751ef1" alt=""><figcaption></figcaption></figure>

| Feature           | Description                                                 |
| ----------------- | ----------------------------------------------------------- |
| Report / unreport | User can report or unreport user in this user setting page. |
| Unfollow          | User can unfollow other user.                               |

You can try these codes:

```
//Use as activity
val intent = AmityUserSettingsActivity.newIntent(context, AmityUser)
startActivity(intent)

//Use as fragment
AmityUserSettingsFragment.newInstance(AmityUser).build(context)
```

#### Report User

```
user
.report()
.flag()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doOnComplete { //success }
.doOnError { //error }
.susbscribe()
```

#### UnReportUser

```
user
.report()
.unflag()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doOnComplete { //success }
.doOnError { //error }
.susbscribe()
```

#### UnFollow User

```
AmityCoreClient
.newUserRepository()
.relationship()
.me()
.unfollow(userId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doOnComplete { //success }
.doOnError { //error }
.susbscribe()
```
