Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ extension BrowserViewController: TabToolbarDelegate, PhotonActionSheetProtocol {
UIAccessibility.post(notification: .layoutChanged, argument: summarizeToolbarEntryContextHintVC)
}

// Reset the CFR timer for the data clearance button to avoid presenting the CFR
// In cases, such as if user navigates to homepage
func resetSummarizeToolbarCFRTimer() {
summarizeToolbarEntryContextHintVC.stopTimer()
}

// MARK: - Translation CFR
func configureTranslationContextualHint(for view: UIView) {
guard let state = store.state.screenState(ToolbarState.self, for: .toolbar, window: windowUUID) else { return }
Expand Down Expand Up @@ -181,6 +187,12 @@ extension BrowserViewController: TabToolbarDelegate, PhotonActionSheetProtocol {
resetTranslationCFRTimer()
}
}

func resetCFRsTimer() {
resetDataClearanceCFRTimer()
resetSummarizeToolbarCFRTimer()
}

// Reset the CFR timer for the translation button to avoid presenting the CFR
// In cases, such as if translation icon is not available
private func resetTranslationCFRTimer() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,7 @@ class BrowserViewController: UIViewController,
/// on the tab bar to open a new tab or by pressing the home page button on the tab bar. Inline is false when
/// it's the zero search page, aka when the home page is shown by clicking the url bar from a loaded web page.
func showEmbeddedHomepage(inline: Bool, isPrivate: Bool) {
resetDataClearanceCFRTimer()
resetCFRsTimer()

if isPrivate && featureFlags.isFeatureEnabled(.feltPrivacySimplifiedUI, checking: .buildOnly) {
browserDelegate?.showPrivateHomepage(overlayManager: overlayManager)
Expand Down