Skip to content

Change (report room) : check if server supports the report room api #4718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2025

Conversation

ganfra
Copy link
Member

@ganfra ganfra commented May 14, 2025

Content

What the title says.

Motivation and context

Final bit for #4315

Screenshots / GIFs

No ui change.

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@ganfra ganfra added the PR-Change For updates to an existing feature label May 14, 2025
@ganfra ganfra marked this pull request as ready for review May 14, 2025 09:10
@ganfra ganfra requested a review from a team as a code owner May 14, 2025 09:10
@ganfra ganfra requested review from bmarty and removed request for a team May 14, 2025 09:10
Copy link
Contributor

📱 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/iYoFci

Copy link

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -100,6 +99,8 @@ class JoinRoomPresenter @AssistedInject constructor(
val hideInviteAvatars by remember {
appPreferencesStore.getHideInviteAvatarsFlow()
}.collectAsState(initial = false)
val canReportRoom by produceState(false) { value = matrixClient.canReportRoom() }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create extension to avoid code duplication?

@Composable
fun MatrixClient.canReportRoomAsState() = produceState(false) { value = canReportRoom() }

Not blocking though!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd not call this code duplication, but as you want

Copy link

codecov bot commented May 14, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 80.15%. Comparing base (e6b1c19) to head (21f75db).
Report is 11 commits behind head on develop.

Files with missing lines Patch % Lines
.../android/libraries/matrix/impl/RustMatrixClient.kt 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4718      +/-   ##
===========================================
- Coverage    80.16%   80.15%   -0.01%     
===========================================
  Files         2126     2126              
  Lines        56313    56322       +9     
  Branches      7021     7022       +1     
===========================================
+ Hits         45141    45146       +5     
- Misses        8761     8765       +4     
  Partials      2411     2411              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ganfra ganfra merged commit 49b8855 into develop May 14, 2025
35 of 36 checks passed
@ganfra ganfra deleted the feature/fga/report_room_enabled_flow branch May 14, 2025 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Change For updates to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants