Skip to content

Commit

Permalink
Update the position detector plugin to use the new API
Browse files Browse the repository at this point in the history
  • Loading branch information
0nko committed Sep 19, 2024
1 parent a9c3d4f commit 589e086
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.duckduckgo.app.browser.omnibar

import com.duckduckgo.app.settings.db.SettingsDataStore
import com.duckduckgo.app.statistics.api.BrowserFeatureParameterReporterPlugin
import com.duckduckgo.app.statistics.api.BrowserFeatureStateReporterPlugin
import com.duckduckgo.app.statistics.pixels.Pixel.PixelParameter
import com.duckduckgo.di.scopes.AppScope
import com.squareup.anvil.annotations.ContributesBinding
Expand All @@ -27,13 +27,13 @@ import javax.inject.Inject

interface OmnibarPositionReporterPlugin

@ContributesMultibinding(scope = AppScope::class, boundType = BrowserFeatureParameterReporterPlugin::class)
@ContributesMultibinding(scope = AppScope::class, boundType = BrowserFeatureStateReporterPlugin::class)
@ContributesBinding(scope = AppScope::class, boundType = OmnibarPositionReporterPlugin::class)
@SingleInstanceIn(AppScope::class)
class OmnibarPositionDetector @Inject constructor(
private val settingsDataStore: SettingsDataStore,
) : OmnibarPositionReporterPlugin, BrowserFeatureParameterReporterPlugin {
override fun featureParameter(): Pair<String, String> {
return PixelParameter.ADDRESS_BAR to settingsDataStore.omnibarPosition.name
) : OmnibarPositionReporterPlugin, BrowserFeatureStateReporterPlugin {
override fun featureStateParams(): Map<String, String> {
return mapOf(PixelParameter.ADDRESS_BAR to settingsDataStore.omnibarPosition.name)
}
}

This file was deleted.

This file was deleted.

0 comments on commit 589e086

Please sign in to comment.