element-hq / element-x-android

Android Matrix messenger application using the Matrix Rust Sdk and Jetpack Compose
GNU Affero General Public License v3.0
1.08k stars 155 forks source link

Remove duplicated code regarding user (room member and user profile) screens #3700

Closed bmarty closed 4 weeks ago

bmarty commented 1 month ago

Content

Let RoomMemberDetailsPresenter delegates the computation of profile state to UserProfilePresenter, which allow to reduce code duplication.

Motivation and context

Less code duplication (production and test).

Preparatory work for #3684

Screenshots / GIFs

Tests

There should be no change.

Tested devices

Checklist

github-actions[bot] commented 1 month ago

:iphone: Scan the QR code below to install the build (arm64 only) for this PR. QR code If you can't scan the QR code you can install the build via this link: https://i.diawi.com/QTwTpH

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 68.88889% with 14 lines in your changes missing coverage. Please review.

Project coverage is 82.77%. Comparing base (e3bc9a2) to head (6106d7b). Report is 11 commits behind head on develop.

Files with missing lines Patch % Lines
...d/features/roomdetails/impl/di/RoomMemberModule.kt 0.00% 4 Missing :warning:
...s/userprofile/shared/blockuser/BlockUserSection.kt 42.85% 1 Missing and 3 partials :warning:
...profile/impl/DefaultUserProfilePresenterFactory.kt 0.00% 3 Missing :warning:
...ures/userprofile/impl/root/UserProfilePresenter.kt 86.36% 0 Missing and 3 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3700 +/- ## =========================================== - Coverage 82.79% 82.77% -0.02% =========================================== Files 1752 1751 -1 Lines 41967 41926 -41 Branches 5125 5120 -5 =========================================== - Hits 34746 34705 -41 - Misses 5398 5401 +3 + Partials 1823 1820 -3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud