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

Some edit reverted notification cleanup #4017

Merged
merged 4 commits into from Sep 14, 2021
Merged

Conversation

tonisevener
Copy link
Collaborator

@tonisevener tonisevener commented Aug 16, 2021

Phabricator: https://phabricator.wikimedia.org/T287298

Notes

This is part one of many for T287298. This task is just some early code cleanup I decided to do before digging into the RemoteNotifications database work. From this point forward I think it would be easier if we thought of edit reverted holistically with the other notification types than tiptoeing around this code. It also removes local notification scheduling for edit revert.

After review, please wait for #4013 to be reviewed and merged. Then update this with feature/notifications and merge.

Test Steps

Nothing major to test for now, just confirm it builds and runs.

@tonisevener tonisevener requested review from a team and staykids and removed request for a team August 16, 2021 21:20
@tonisevener tonisevener changed the base branch from feature/notifications to T287305-2 August 18, 2021 17:39
@tonisevener tonisevener added the Dependent PR PR is dependent on another PR - merge dependent PR first and update branch before merging label Aug 18, 2021
- remove category and actions setup, will add back later
- remove local notification scheduling for edit reverted
- remove category validation when adding to database
Copy link
Contributor

@staykids staykids left a comment

Choose a reason for hiding this comment

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

Nothing major to test for now, just confirm it builds and runs.

It builds, it runs! One minor question below.

let modelChange = RemoteNotificationsModelChange(type: modelChangeType, notificationsGroupedByCategoryNumber: notificationsGroupedByCategoryNumber)
let responseCoordinator = RemoteNotificationsModelChangeResponseCoordinator(modelChange: modelChange, modelController: self)
DispatchQueue.main.async {
NotificationCenter.default.post(name: RemoteNotificationsModelController.modelDidChangeNotification, object: responseCoordinator)
Copy link
Contributor

Choose a reason for hiding this comment

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

Apologies if I'm missing its usage in the subsequent PRs, but would it also make sense to remove line 45 which no longer appears to be used?

public static let modelDidChangeNotification = NSNotification.Name(rawValue: "RemoteNotificationsModelDidChange")

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nice catch! I pushed a commit removing this.

@staykids staykids removed their assignment Sep 14, 2021
Base automatically changed from T287305-2 to feature/notifications September 14, 2021 21:18
@tonisevener tonisevener merged commit db2b91a into feature/notifications Sep 14, 2021
@tonisevener tonisevener deleted the T287298-3 branch September 14, 2021 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependent PR PR is dependent on another PR - merge dependent PR first and update branch before merging
2 participants