-
Notifications
You must be signed in to change notification settings - Fork 226
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
Conversation
…creen. #2912 Also improve previews of NotificationSettingsView.
…ly one available push distributor.
…ed` is emitting first.
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov ReportAttention: Patch coverage is
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. |
There was a problem hiding this 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) } |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK: 9a24e7d
.../io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenter.kt
Show resolved
Hide resolved
.../io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenter.kt
Outdated
Show resolved
Hide resolved
...tlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsState.kt
Show resolved
Hide resolved
...otlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsView.kt
Show resolved
Hide resolved
…from the service.
…m `AsyncAction` to `AsyncData`
|
Type of change
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
Tested devices
Checklist