-
Notifications
You must be signed in to change notification settings - Fork 71
DROID-3736 Space settings | Mute, unmute for chat notifications #2558
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
DROID-3736 Space settings | Mute, unmute for chat notifications #2558
Conversation
…from-middle # Conflicts: # app/gradle.properties # gradle/libs.versions.toml
…from-middle # Conflicts: # core-models/src/main/java/com/anytypeio/anytype/core_models/Relations.kt # domain/src/main/java/com/anytypeio/anytype/domain/multiplayer/SpaceViewSubscriptionContainer.kt # gradle/libs.versions.toml # middleware/src/main/java/com/anytypeio/anytype/middleware/interactor/events/PushKeyMiddlewareChannel.kt
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.
Pull Request Overview
This PR introduces mute/unmute functionality for chat notifications and refactors related notification handling across presentation, middleware, and domain layers.
- Updates the UI and event models to include a target space identifier (targetSpaceId) for notification settings.
- Implements backend integration for setting the space notification mode and adjusts data mappings accordingly.
- Updates build configurations and dependency injections to support the new notification flow.
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
presentation/src/main/java/com/anytypeio/anytype/presentation/spaces/UiState.kt | Adds targetSpaceId property and refactors Notifications item to a data object. |
presentation/src/main/java/com/anytypeio/anytype/presentation/spaces/UiEvent.kt | Adds targetSpaceId to notification setting events. |
presentation/src/main/java/com/anytypeio/anytype/presentation/spaces/SpaceSettingsViewModel.kt | Injects new use case and passes targetSpaceId in notification state updates. |
middleware/src/main/java/com/anytypeio/anytype/middleware/service/MiddlewareServiceImplementation.kt | Introduces setSpaceMode API with generic exception handling. |
middleware/src/main/java/com/anytypeio/anytype/middleware/mappers/ToMiddlewareModelMappers.kt | Adds mapping from NotificationState to middleware model. |
feature-ui-settings/* | Updates previews, preference sheet, and notifications item UI to incorporate targetSpaceId. |
domain/, data/, core-models/, app/ | Adjusts interfaces, repositories, and DI to support new notification mode functionality. |
Comments suppressed due to low confidence (3)
middleware/src/main/java/com/anytypeio/anytype/middleware/service/MiddlewareServiceImplementation.kt:2678
- Consider throwing a more specific exception (e.g., NotificationModeUpdateException) instead of a generic Exception to improve error handling clarity.
throw Exception(error.description)
core-models/src/main/java/com/anytypeio/anytype/core_models/ObjectWrapper.kt:378
- Ensure the fallback to NotificationState.ALL is aligned with backend expectations if the space notification mode property is missing; consider documenting this behavior for clarity.
?.let { code ->
presentation/src/main/java/com/anytypeio/anytype/presentation/spaces/SpaceSettingsViewModel.kt:281
- [nitpick] Since targetSpaceId is a key parameter for notification updates, confirm that using isNullOrEmpty() is appropriate for the Id type and document any assumptions regarding its format.
if (!targetSpaceId.isNullOrEmpty()) {
Description
What type of PR is this? (check all applicable)
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?