mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
Bug 1820242 - Remove in_progress_media_tab_opened probe
This commit is contained in:
parent
f15d0ecbef
commit
0342a75107
@ -8084,23 +8084,6 @@ recent_tabs:
|
||||
metadata:
|
||||
tags:
|
||||
- RecentTabs
|
||||
in_progress_media_tab_opened:
|
||||
type: event
|
||||
description: |
|
||||
User has opened a recent media tab from homescreen.
|
||||
bugs:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/20393
|
||||
data_reviews:
|
||||
- https://github.com/mozilla-mobile/fenix/pull/20138
|
||||
- https://github.com/mozilla-mobile/fenix/pull/24982
|
||||
data_sensitivity:
|
||||
- interaction
|
||||
notification_emails:
|
||||
- android-probes@mozilla.com
|
||||
expires: 114
|
||||
metadata:
|
||||
tags:
|
||||
- RecentTabs
|
||||
section_visible:
|
||||
type: boolean
|
||||
description: |
|
||||
|
@ -396,7 +396,6 @@ class HomeFragment : Fragment() {
|
||||
recentTabController = DefaultRecentTabsController(
|
||||
selectTabUseCase = components.useCases.tabsUseCases.selectTab,
|
||||
navController = findNavController(),
|
||||
store = components.core.store,
|
||||
appStore = components.appStore,
|
||||
),
|
||||
recentSyncedTabController = DefaultRecentSyncedTabController(
|
||||
|
@ -5,14 +5,12 @@
|
||||
package org.mozilla.fenix.home.recenttabs.controller
|
||||
|
||||
import androidx.navigation.NavController
|
||||
import mozilla.components.browser.state.store.BrowserStore
|
||||
import mozilla.components.feature.tabs.TabsUseCases.SelectTabUseCase
|
||||
import mozilla.components.service.glean.private.NoExtras
|
||||
import org.mozilla.fenix.GleanMetrics.RecentTabs
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.components.AppStore
|
||||
import org.mozilla.fenix.components.appstate.AppAction
|
||||
import org.mozilla.fenix.ext.inProgressMediaTab
|
||||
import org.mozilla.fenix.home.HomeFragmentDirections
|
||||
import org.mozilla.fenix.home.recenttabs.RecentTab
|
||||
import org.mozilla.fenix.home.recenttabs.interactor.RecentTabInteractor
|
||||
@ -47,16 +45,11 @@ interface RecentTabController {
|
||||
class DefaultRecentTabsController(
|
||||
private val selectTabUseCase: SelectTabUseCase,
|
||||
private val navController: NavController,
|
||||
private val store: BrowserStore,
|
||||
private val appStore: AppStore,
|
||||
) : RecentTabController {
|
||||
|
||||
override fun handleRecentTabClicked(tabId: String) {
|
||||
if (tabId == store.state.inProgressMediaTab?.id) {
|
||||
RecentTabs.inProgressMediaTabOpened.record(NoExtras())
|
||||
} else {
|
||||
RecentTabs.recentTabOpened.record(NoExtras())
|
||||
}
|
||||
RecentTabs.recentTabOpened.record(NoExtras())
|
||||
|
||||
selectTabUseCase.invoke(tabId)
|
||||
navController.navigate(R.id.browserFragment)
|
||||
|
@ -59,7 +59,6 @@ class RecentTabControllerTest {
|
||||
DefaultRecentTabsController(
|
||||
selectTabUseCase = selectTabUseCase.selectTab,
|
||||
navController = navController,
|
||||
store = store,
|
||||
appStore = appStore,
|
||||
),
|
||||
)
|
||||
@ -68,7 +67,6 @@ class RecentTabControllerTest {
|
||||
@Test
|
||||
fun handleRecentTabClicked() {
|
||||
assertNull(RecentTabs.recentTabOpened.testGetValue())
|
||||
assertNull(RecentTabs.inProgressMediaTabOpened.testGetValue())
|
||||
|
||||
every { navController.currentDestination } returns mockk {
|
||||
every { id } returns R.id.homeFragment
|
||||
@ -88,13 +86,11 @@ class RecentTabControllerTest {
|
||||
navController.navigate(R.id.browserFragment)
|
||||
}
|
||||
assertNotNull(RecentTabs.recentTabOpened.testGetValue())
|
||||
assertNull(RecentTabs.inProgressMediaTabOpened.testGetValue())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun handleRecentTabClickedForMediaTab() {
|
||||
assertNull(RecentTabs.recentTabOpened.testGetValue())
|
||||
assertNull(RecentTabs.inProgressMediaTabOpened.testGetValue())
|
||||
|
||||
every { navController.currentDestination } returns mockk {
|
||||
every { id } returns R.id.homeFragment
|
||||
@ -115,8 +111,7 @@ class RecentTabControllerTest {
|
||||
selectTabUseCase.selectTab.invoke(inProgressMediaTab.id)
|
||||
navController.navigate(R.id.browserFragment)
|
||||
}
|
||||
assertNull(RecentTabs.recentTabOpened.testGetValue())
|
||||
assertNotNull(RecentTabs.inProgressMediaTabOpened.testGetValue())
|
||||
assertNotNull(RecentTabs.recentTabOpened.testGetValue())
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user