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

GOVUKAPP-630 Clear visited Items #113

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

raphaelolu
Copy link
Contributor

This pr adds clear all functionality to the recent activity view

@raphaelolu raphaelolu requested a review from a team as a code owner October 10, 2024 00:01
Copy link

sonarcloud bot commented Oct 10, 2024

@@ -76,6 +76,13 @@ extension AppEvent {
)
}

static func clearRecentActivity() -> AppEvent {
.init(
name: "Cleared_recent_activity",
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't seem to match the other name formats for AppEvent?

"recentActivityNavigationTitle"
)
func deleteActivities() {
for item in model.todaysActivites {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be done in the ActivityService -> ActivityRepository
It should also really be done on the background context.

}
model.todaysActivites.removeAll()
model.currentMonthActivities.removeAll()
model.recentMonthActivities.removeAll()
Copy link
Contributor

Choose a reason for hiding this comment

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

What would happen here if a previous save failed?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like snapshots are potentially wrong here... plenty of snapshots here that shouldn't have changed

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