Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit d70d5cd

Browse files
authored
Fix AI Chat address bar pixel (#3720)
Task/Issue URL: https://app.asana.com/0/414235014887631/1208965876736143/f **Description**: Fire AI Chat address bar pixel Fixes share button pixel
1 parent 7273be8 commit d70d5cd

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Core/PixelEvent.swift

+2
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,7 @@ extension Pixel {
916916
case openAIChatBefore10min
917917
case openAIChatAfter10min
918918
case aiChatNoRemoteSettingsFound(settings: String)
919+
case openAIChatFromAddressBar
919920

920921
// MARK: Lifecycle
921922
case appDidTransitionToUnexpectedState
@@ -1833,6 +1834,7 @@ extension Pixel.Event {
18331834
case .openAIChatBefore10min: return "m_aichat_open_before_10_min"
18341835
case .aiChatNoRemoteSettingsFound(let settings):
18351836
return "m_aichat_no_remote_settings_found-\(settings.lowercased())"
1837+
case .openAIChatFromAddressBar: return "m_aichat_addressbar_icon"
18361838

18371839
// MARK: Lifecycle
18381840
case .appDidTransitionToUnexpectedState: return "m_debug_app-did-transition-to-unexpected-state"

DuckDuckGo/MainViewController.swift

+2
Original file line numberDiff line numberDiff line change
@@ -2089,7 +2089,9 @@ extension MainViewController: OmniBarDelegate {
20892089
switch accessoryType {
20902090
case .chat:
20912091
openAIChat()
2092+
Pixel.fire(pixel: .openAIChatFromAddressBar)
20922093
case .share:
2094+
Pixel.fire(pixel: .addressBarShare)
20932095
currentTab?.onShareAction(forLink: link, fromView: viewCoordinator.omniBar.accessoryButton)
20942096
}
20952097
}

DuckDuckGo/OmniBar.swift

-1
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,6 @@ class OmniBar: UIView {
546546
}
547547

548548
@IBAction func onAccessoryPressed(_ sender: Any) {
549-
Pixel.fire(pixel: .addressBarShare)
550549
omniDelegate?.onAccessoryPressed(accessoryType: accessoryType)
551550
}
552551

0 commit comments

Comments
 (0)