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 @@ -269,6 +269,7 @@ class BrowserActivity : DuckDuckGoActivity(), CoroutineScope {
}

fun launchFire() {
pixel.fire(Pixel.PixelName.FORGET_ALL_PRESSED_BROWSING)
val dialog = FireDialog(context = this, clearPersonalDataAction = clearPersonalDataAction)
dialog.clearStarted = {
removeObservers()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ interface Pixel {
enum class PixelName(val pixelName: String) {

APP_LAUNCH("ml"),

FORGET_ALL_PRESSED_BROWSING("mf_bp"),
FORGET_ALL_PRESSED_TABSWITCHING("mf_tp"),
FORGET_ALL_EXECUTED("mf"),

APPLICATION_CRASH("m_d_ac"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import com.duckduckgo.app.global.view.ClearPersonalDataAction
import com.duckduckgo.app.global.view.FireDialog
import com.duckduckgo.app.settings.SettingsActivity
import com.duckduckgo.app.statistics.VariantManager
import com.duckduckgo.app.statistics.pixels.Pixel
import com.duckduckgo.app.tabs.model.TabEntity
import com.duckduckgo.app.tabs.ui.TabSwitcherViewModel.Command
import com.duckduckgo.app.tabs.ui.TabSwitcherViewModel.Command.Close
Expand Down Expand Up @@ -63,6 +64,9 @@ class TabSwitcherActivity : DuckDuckGoActivity(), TabSwitcherListener, Coroutine
@Inject
lateinit var webViewPreviewPersister: WebViewPreviewPersister

@Inject
lateinit var pixel: Pixel

private val viewModel: TabSwitcherViewModel by bindViewModel()

private val tabsAdapter: TabSwitcherAdapter by lazy { TabSwitcherAdapter(this, webViewPreviewPersister) }
Expand Down Expand Up @@ -165,6 +169,7 @@ class TabSwitcherActivity : DuckDuckGoActivity(), TabSwitcherListener, Coroutine
}

private fun onFire() {
pixel.fire(Pixel.PixelName.FORGET_ALL_PRESSED_TABSWITCHING)
val dialog = FireDialog(context = this, clearPersonalDataAction = clearPersonalDataAction)
dialog.clearComplete = { viewModel.onClearComplete() }
dialog.show()
Expand Down