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

Local Notification Settings Event #7300

Merged
merged 66 commits into from
Oct 13, 2022

Conversation

ericdecanini
Copy link
Contributor

@ericdecanini ericdecanini commented Oct 5, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Handles the client side of using the LocalNotificationSettings event to remotely toggle an account's notifications

Motivation and context

Epic https://element-io.atlassian.net/browse/PSG-595
Closes https://element-io.atlassian.net/browse/PSG-779

Screenshots / GIFs

N/A

Tests

The account data event can only be sent from web build from https://element-io.atlassian.net/browse/PSG-709 so this was tested locally by making changes in the code forcing the silenced value to false

Tested devices

  • Physical
  • Emulator
  • OS version(s): Android 13

Checklist

@ericdecanini ericdecanini changed the base branch from develop to feature/eric/notificaton-settings-enabled October 5, 2022 21:54
@ericdecanini ericdecanini marked this pull request as ready for review October 5, 2022 21:54
…ifications

# Conflicts:
#	vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewAction.kt
#	vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewFragment.kt
#	vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewViewModel.kt
#	vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewViewState.kt
#	vector/src/main/res/layout/fragment_session_overview.xml
#	vector/src/test/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewViewModelTest.kt
…ic/notificaton-settings-enabled

# Conflicts:
#	vector/src/test/java/im/vector/app/core/pushers/PushersManagerTest.kt
…icaton-settings-enabled

# Conflicts:
#	vector/src/test/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewViewModelTest.kt
#	vector/src/test/java/im/vector/app/test/fakes/FakePushersService.kt
@@ -28,4 +28,5 @@ object UserAccountDataTypes {
const val TYPE_IDENTITY_SERVER = "m.identity_server"
const val TYPE_ACCEPTED_TERMS = "m.accepted_terms"
const val TYPE_OVERRIDE_COLORS = "im.vector.setting.override_colors"
const val TYPE_LOCAL_NOTIFICATION_SETTINGS = "m.local_notification_settings"
Copy link
Contributor

Choose a reason for hiding this comment

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

This need to unstable prefix. Please see the bottom of the MSC-3890

val currentSession = activeSessionHolder.getActiveSession()
viewModelScope.launch {
currentSession.accountDataService()
.getLiveUserAccountDataEvent(UserAccountDataTypes.TYPE_LOCAL_NOTIFICATION_SETTINGS)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to add device_id at the end of the UserAccountDataTypes.TYPE_LOCAL_NOTIFICATION_SETTINGS type according to the MSC?

Base automatically changed from feature/eric/notificaton-settings-enabled to develop October 12, 2022 13:27
Copy link
Contributor

@onurays onurays left a comment

Choose a reason for hiding this comment

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

Thanks for the update. LGTM but didn't test on a device.

@sonarcloud
Copy link

sonarcloud bot commented Oct 13, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@ericdecanini ericdecanini merged commit 963c0e5 into develop Oct 13, 2022
@ericdecanini ericdecanini deleted the feature/eric/local_notification_settings branch October 13, 2022 03:11
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