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

[Poll] Error handling for push rules synchronization #8141

Merged
merged 8 commits into from
Feb 24, 2023

Conversation

Florian14
Copy link
Contributor

@Florian14 Florian14 commented Feb 17, 2023

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Display an error in the settings screen when push rules are out of sync (after opening the screen or modifying the rules)

Added a live refresh of the notification setting screens when the account data is updated (eg. from another client)

Motivation and context

Error handling of the new push rules introduced in #8114

Screenshots / GIFs

image

Tests

On a synapse supporting the new push rules

  • update the default rules in the notification settings (Direct messages and/or group messages fields)
  • break the sync of the rules by editing the push rules entry in the account data (using /devtools from a web instance)
  • verify that an error is displayed upon the broken rule

Note that the rules should be automatically realigned by #8130 so the error may be not visible

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@Florian14 Florian14 changed the base branch from develop to feature/fre/poll_sync_push_rules_after_creation February 17, 2023 09:33
Base automatically changed from feature/fre/poll_sync_push_rules_after_creation to develop February 17, 2023 12:46
@Florian14 Florian14 force-pushed the feature/fre/poll_sync_error_handling branch from b124b02 to 29d4a17 Compare February 20, 2023 13:02
@Florian14 Florian14 requested review from a team and yostyle and removed request for a team February 20, 2023 14:21
@Florian14 Florian14 force-pushed the feature/fre/poll_sync_error_handling branch from 29d4a17 to 021babc Compare February 23, 2023 08:24
}
}
}

protected fun refreshDisplay() {
listView?.adapter?.notifyDataSetChanged()

Choose a reason for hiding this comment

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

  • ⚠️ It will always be more efficient to use more specific change events if you can. Rely on notifyDataSetChanged as a last resort.
  • ⚠️ It will always be more efficient to use more specific change events if you can. Rely on notifyDataSetChanged as a last resort.

@sonarcloud
Copy link

sonarcloud bot commented Feb 23, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

72.2% 72.2% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@yostyle yostyle left a comment

Choose a reason for hiding this comment

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

LGTM

@Florian14 Florian14 merged commit ea63597 into develop Feb 24, 2023
@Florian14 Florian14 deleted the feature/fre/poll_sync_error_handling branch February 24, 2023 08: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.

3 participants