Skip to content

Move push provider setting #2928

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 10 commits into from
May 28, 2024
Merged

Move push provider setting #2928

merged 10 commits into from
May 28, 2024

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented May 28, 2024

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other : iterate on setting screens

Content

Move push provider setting to the "Notifications" screen and display it only when several push provider are available.

Motivation and context

Closes #2912

Screenshots / GIFs

See recorded ones

Tests

  • Install ntfy and check that changing the push provider from the new location (Settings/Notifications) still works

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@bmarty bmarty requested a review from a team as a code owner May 28, 2024 08:32
@bmarty bmarty requested review from jmartinesp and removed request for a team May 28, 2024 08:32
Copy link
Contributor

github-actions bot commented May 28, 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/FzuwW3

Copy link

codecov bot commented May 28, 2024

Codecov Report

Attention: Patch coverage is 88.31169% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 75.15%. Comparing base (d0b2233) to head (35a02a2).
Report is 11 commits behind head on develop.

Files Patch % Lines
...ces/impl/notifications/NotificationSettingsView.kt 73.07% 0 Missing and 7 partials ⚠️
...mpl/notifications/NotificationSettingsPresenter.kt 95.00% 0 Missing and 1 partial ⚠️
...lement/android/libraries/architecture/AsyncData.kt 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2928   +/-   ##
========================================
  Coverage    75.15%   75.15%           
========================================
  Files         1549     1549           
  Lines        36958    36973   +15     
  Branches      7178     7183    +5     
========================================
+ Hits         27774    27787   +13     
- Misses        5429     5431    +2     
  Partials      3755     3755           

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

@bmarty bmarty added the Run-Maestro Starts a Maestro Cloud session to run integration tests label May 28, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label May 28, 2024
Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

It LGTM in general, but I think there are some point which could be improved. Thanks for the changes!

distributors.map { it.second.name }
}

var currentDistributorName by remember { mutableStateOf<AsyncAction<String>>(AsyncAction.Uninitialized) }
Copy link
Member

Choose a reason for hiding this comment

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

Should this be AsyncData instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Could be but currentDistributorName is also updated when the user change the distributor, so it's also an AsyncAction... The boundaries between the 2 sealed interface is thin.

Copy link
Member

Choose a reason for hiding this comment

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

I mean, having an 'action' called currentDistributorName is kind of weird, that's why I thought AsyncData fits it better. More so if we're going to use the LaunchedEffect to fetch it.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK: 9a24e7d

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@bmarty bmarty merged commit 17678ad into develop May 28, 2024
21 checks passed
@bmarty bmarty deleted the feature/bma/movePushSetting branch May 28, 2024 22:29
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.

Move Push provider settings to the notification settings
2 participants