feat(NotificationSettingsViewModel): New VM to hold notification settings state - #1985
Open
KaylaBrady wants to merge 11 commits into
Open
feat(NotificationSettingsViewModel): New VM to hold notification settings state#1985KaylaBrady wants to merge 11 commits into
KaylaBrady wants to merge 11 commits into
Conversation
KaylaBrady
commented
Sep 3, 2026
| ) | ||
| } | ||
|
|
||
| lateinit var settings: MutableState<FavoriteSettings.Notifications> |
Collaborator
Author
There was a problem hiding this comment.
Some of these tests were testing a mix of UI changes + data changes - I've opted to update them to just UI changes rather than testing the innerworkings of calls to the VM
KaylaBrady
commented
Sep 3, 2026
| .bind(IMapViewModel::class) | ||
| single { NearbyViewModel(get(), get(), get(named("coroutineDispatcherDefault"))) } | ||
| .bind(INearbyViewModel::class) | ||
| factory { NotificationSettingsViewModel(get()) }.bind(INotificationSettingsViewModel::class) |
Collaborator
Author
There was a problem hiding this comment.
If we make this a single, it would effectively save your last selected window for the app session. Will check with design if that is desirable
Collaborator
Author
There was a problem hiding this comment.
Update: We could make this a single, but I'm going to consider it as a follow up in case there are any other implications of that change to consider.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ticket: No ticket, follow up to #1971
What is this PR for?
Adds a new NotificationSettingsViewModel and adopts it on android and iOS. I intended to just get this PR out adopting it for android... but I wanted to make sure the pieces would all fit on iOS too, so this PR is bigger than I would have liked. Sorry for the increased size!!
Overall I'm happier with this modelling of
Presetand think that pushing more logic into shared is an improvement.iOS
android
withContext(Dispatchers.Default)where possible (ideally in shared code)Testing
What testing have you done?
NotificationSettingsWidgetuse a pure helper view instead of dealing with the mock VM setup for simplicity.