Skip to content
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

Feature/bma/fix fdroid notification #3035

Merged
merged 30 commits into from
Jun 18, 2024
Merged

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Jun 14, 2024

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Fix issue on code running twice, and add more log regarding pusher registration.

This change also include a dialog to help user with no distributor installed. For UnifiedPush, this will act like this:

NoDistributors

Also: if several push distributors are available (Firebase + UnifiedPush), the application will use Firebase by default (as before), but if not available, it will fallback to UnifiedPush is a UnifiedPush distributor is available on the system.

Motivation and context

Help investigate #3031

Screenshots / GIFs

Tests

  • Install Ntfy
  • Use F-Droid variant
  • Connect to a Matrix account
  • Check that the notification troubleshoot does not report any error
  • The application is receiving push and notification are displayed.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@bmarty bmarty requested a review from a team as a code owner June 14, 2024 11:32
@bmarty bmarty requested review from ganfra and removed request for a team June 14, 2024 11:32
result.onFailure {
Timber.e(it, "Failed to register pusher")
}
if (isVerified) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Checking isVerified first, else ensurePusherIsRegistered() is called twice:

image

By checking first the value:

image

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed by bc30aee

Copy link
Contributor

github-actions bot commented Jun 14, 2024

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

Copy link

codecov bot commented Jun 14, 2024

Codecov Report

Attention: Patch coverage is 73.37278% with 45 lines in your changes missing coverage. Please review.

Project coverage is 75.87%. Comparing base (849f64f) to head (d69a5ee).
Report is 7 commits behind head on develop.

Files Patch % Lines
...io/element/android/appnav/loggedin/LoggedInView.kt 34.61% 8 Missing and 9 partials ⚠️
...omponents/dialogs/ErrorDialogWithDoNotShowAgain.kt 75.00% 0 Missing and 7 partials ⚠️
...ement/android/appnav/loggedin/LoggedInPresenter.kt 92.15% 2 Missing and 2 partials ⚠️
...droid/appnav/loggedin/PusherRegistrationFailure.kt 57.14% 3 Missing ⚠️
...droid/libraries/architecture/appyx/BackStackExt.kt 0.00% 3 Missing ⚠️
.../android/libraries/push/impl/DefaultPushService.kt 50.00% 3 Missing ⚠️
...id/libraries/pushproviders/api/PusherSubscriber.kt 0.00% 3 Missing ⚠️
...oid/libraries/push/impl/DefaultPusherSubscriber.kt 66.66% 1 Missing and 1 partial ⚠️
.../features/preferences/api/PreferencesEntryPoint.kt 0.00% 1 Missing ⚠️
...s/preferences/impl/DefaultPreferencesEntryPoint.kt 0.00% 0 Missing and 1 partial ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3035      +/-   ##
===========================================
+ Coverage    75.81%   75.87%   +0.06%     
===========================================
  Files         1623     1628       +5     
  Lines        38208    38349     +141     
  Branches      7363     7401      +38     
===========================================
+ Hits         28966    29097     +131     
+ Misses        5391     5382       -9     
- Partials      3851     3870      +19     

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

@bmarty bmarty marked this pull request as draft June 17, 2024 09:30
@bmarty bmarty force-pushed the feature/bma/fixFdroidNotification branch from deb94e0 to 1433011 Compare June 17, 2024 09:33
@bmarty bmarty force-pushed the feature/bma/fixFdroidNotification branch from 1433011 to 64930e4 Compare June 17, 2024 09:38
@bmarty bmarty added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jun 17, 2024
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jun 17, 2024
…ror in troubleshoot test will not be accurate.

Also when registering for the first time, pick the fist available provider with at least one distributor.
@bmarty bmarty added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jun 17, 2024
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jun 17, 2024
@bmarty bmarty added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jun 17, 2024
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jun 17, 2024
ElementBot and others added 2 commits June 17, 2024 16:15
@bmarty bmarty marked this pull request as ready for review June 17, 2024 16:29
@bmarty bmarty added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jun 17, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jun 17, 2024
Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

LGTM!
Lets just change the isVerified to keep the state inside the LaunchedEffect

Copy link

sonarcloud bot commented Jun 18, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@bmarty bmarty added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jun 18, 2024
@bmarty bmarty enabled auto-merge June 18, 2024 10:37
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jun 18, 2024
@bmarty bmarty merged commit 7b5e7c4 into develop Jun 18, 2024
26 of 27 checks passed
@bmarty bmarty deleted the feature/bma/fixFdroidNotification branch June 18, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants