From 535bb0ff0f64d57be1074e33ceb42f598f80205b Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sat, 25 Apr 2026 00:41:34 -0500 Subject: DomainDig v4.1.0: Add a full local data reset flow in Data Management - add a destructive Delete All Data action with confirmation, progress, success, and failure handling - centralize wipe behavior in DataResetService instead of scattering delete logic in views - clear local persistence, temp/export files, integration secrets, notifications, caches, and in-memory app state - reset sync, purchase, and integration services after wipe so the app returns to a clean first-launch state Polish batch and empty-state UX - present the batch sweep summary after manual bulk searches complete, not only from Watchlist - align the Workflows empty state styling with other empty states by removing the extra background card treatment Bump the project version from 4.0.0 to 4.1.0 --- DomainDig/DomainViewModel.swift | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'DomainDig/DomainViewModel.swift') diff --git a/DomainDig/DomainViewModel.swift b/DomainDig/DomainViewModel.swift index b65c6df..1d75221 100644 --- a/DomainDig/DomainViewModel.swift +++ b/DomainDig/DomainViewModel.swift @@ -953,6 +953,46 @@ final class DomainViewModel { refreshDataLifecycleSummary() } + func applyLocalDataReset() async { + domain = "" + bulkInput = "" + reset() + + recentSearches = [] + savedDomains = [] + trackedDomains = [] + history = [] + workflows = [] + historySearchText = "" + historyDateFilter = .all + historyChangeFilter = .all + historySortOption = .newest + timelineGrouping = .relativeDay + timelineDomainFilter = "" + watchlistSearchText = "" + watchlistFilter = .all + watchlistSortOption = .pinned + dashboardSearchText = "" + dashboardFilter = .all + monitoringSettings = MonitoringSettings() + monitoringLogs = [] + notificationsAuthorized = false + monitoringRunInProgress = false + monitoringStatusMessage = nil + portabilityStatusMessage = "All local data removed." + upgradePrompt = nil + isPaywallPresented = false + selectedSnapshotIDs.removeAll() + activeDomainDiff = nil + activeDiffChangeIndex = 0 + latestBatchSweepSummary = nil + latestWorkflowRunSummary = nil + historyAutoPruneOption = Self.loadHistoryAutoPruneOption() + refreshDataLifecycleSummary() + await refreshUsageCredits() + await refreshMonitoringAuthorizationStatus() + } + func refreshMonitoringAuthorizationStatus() async { let settings = await UNUserNotificationCenter.current().notificationSettings() monitoringNotificationStatus = settings.authorizationStatus -- cgit v1.2.3