diff --git a/app/src/androidTest/java/com/duckduckgo/app/browser/BrowserTabViewModelTest.kt b/app/src/androidTest/java/com/duckduckgo/app/browser/BrowserTabViewModelTest.kt index a50ac03f7143..35a28baa5d5c 100644 --- a/app/src/androidTest/java/com/duckduckgo/app/browser/BrowserTabViewModelTest.kt +++ b/app/src/androidTest/java/com/duckduckgo/app/browser/BrowserTabViewModelTest.kt @@ -5377,10 +5377,10 @@ class BrowserTabViewModelTest { givenCurrentSite(url) testee.onRefreshRequested(triggeredByUser = false) - verify(mockBrokenSitePrompt, never()).pageLoaded(any()) + verify(mockBrokenSitePrompt, never()).pageRefreshed(any()) testee.onRefreshRequested(triggeredByUser = true) - verify(mockBrokenSitePrompt).pageLoaded(url.toUri()) + verify(mockBrokenSitePrompt).pageRefreshed(url.toUri()) } @Test diff --git a/app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt b/app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt index 316b61aff7f8..eaeade4bdf45 100644 --- a/app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt +++ b/app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt @@ -1235,7 +1235,7 @@ class BrowserTabViewModel @Inject constructor( if (triggeredByUser) { site?.realBrokenSiteContext?.onUserTriggeredRefresh() site?.uri?.let { - brokenSitePrompt.pageLoaded(it) + brokenSitePrompt.pageRefreshed(it) } privacyProtectionsPopupManager.onPageRefreshTriggeredByUser(isOmnibarAtTheTop = settingsDataStore.omnibarPosition == TOP) } diff --git a/broken-site/broken-site-api/src/main/java/com/duckduckgo/brokensite/api/BrokenSitePrompt.kt b/broken-site/broken-site-api/src/main/java/com/duckduckgo/brokensite/api/BrokenSitePrompt.kt index d4c96173d1dc..a15db6c25caa 100644 --- a/broken-site/broken-site-api/src/main/java/com/duckduckgo/brokensite/api/BrokenSitePrompt.kt +++ b/broken-site/broken-site-api/src/main/java/com/duckduckgo/brokensite/api/BrokenSitePrompt.kt @@ -26,7 +26,7 @@ interface BrokenSitePrompt { suspend fun isFeatureEnabled(): Boolean - fun pageLoaded(url: Uri) + fun pageRefreshed(url: Uri) fun resetRefreshCount() diff --git a/broken-site/broken-site-impl/src/main/java/com/duckduckgo/brokensite/impl/RealBrokenSitePrompt.kt b/broken-site/broken-site-impl/src/main/java/com/duckduckgo/brokensite/impl/RealBrokenSitePrompt.kt index e6f0e638b0ef..7beda19052ff 100644 --- a/broken-site/broken-site-impl/src/main/java/com/duckduckgo/brokensite/impl/RealBrokenSitePrompt.kt +++ b/broken-site/broken-site-impl/src/main/java/com/duckduckgo/brokensite/impl/RealBrokenSitePrompt.kt @@ -66,7 +66,7 @@ class RealBrokenSitePrompt @Inject constructor( return _featureEnabled } - override fun pageLoaded( + override fun pageRefreshed( url: Uri, ) { brokenSiteReportRepository.addRefresh(url, currentTimeProvider.localDateTimeNow()) diff --git a/broken-site/broken-site-impl/src/test/java/com/duckduckgo/brokensite/impl/RealBrokenSitePromptTest.kt b/broken-site/broken-site-impl/src/test/java/com/duckduckgo/brokensite/impl/RealBrokenSitePromptTest.kt index 9969bf1b02db..3b8658af0b5f 100644 --- a/broken-site/broken-site-impl/src/test/java/com/duckduckgo/brokensite/impl/RealBrokenSitePromptTest.kt +++ b/broken-site/broken-site-impl/src/test/java/com/duckduckgo/brokensite/impl/RealBrokenSitePromptTest.kt @@ -118,7 +118,7 @@ class RealBrokenSitePromptTest { val url: Uri = org.mockito.kotlin.mock() whenever(mockCurrentTimeProvider.localDateTimeNow()).thenReturn(now) - testee.pageLoaded(url) + testee.pageRefreshed(url) verify(mockBrokenSiteReportRepository).addRefresh(url, now) }