From f2dd0f0a18cad487fba44860c82f2e6e6ece9bd0 Mon Sep 17 00:00:00 2001 From: Christian Sadilek Date: Mon, 18 Jan 2021 13:56:44 -0500 Subject: [PATCH] [fenix] Remove unused SessionManager reference from RecentlyClosedController --- .../fenix/library/recentlyclosed/RecentlyClosedController.kt | 2 -- .../fenix/library/recentlyclosed/RecentlyClosedFragment.kt | 1 - .../recentlyclosed/DefaultRecentlyClosedControllerTest.kt | 3 --- 3 files changed, 6 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/library/recentlyclosed/RecentlyClosedController.kt b/app/src/main/java/org/mozilla/fenix/library/recentlyclosed/RecentlyClosedController.kt index d7676f80be..a4461a2469 100644 --- a/app/src/main/java/org/mozilla/fenix/library/recentlyclosed/RecentlyClosedController.kt +++ b/app/src/main/java/org/mozilla/fenix/library/recentlyclosed/RecentlyClosedController.kt @@ -9,7 +9,6 @@ import android.content.ClipboardManager import android.content.res.Resources import androidx.navigation.NavController import androidx.navigation.NavOptions -import mozilla.components.browser.session.SessionManager import mozilla.components.browser.state.action.RecentlyClosedAction import mozilla.components.browser.state.state.recover.RecoverableTab import mozilla.components.browser.state.store.BrowserStore @@ -33,7 +32,6 @@ interface RecentlyClosedController { class DefaultRecentlyClosedController( private val navController: NavController, private val store: BrowserStore, - private val sessionManager: SessionManager, private val tabsUseCases: TabsUseCases, private val resources: Resources, private val snackbar: FenixSnackbar, diff --git a/app/src/main/java/org/mozilla/fenix/library/recentlyclosed/RecentlyClosedFragment.kt b/app/src/main/java/org/mozilla/fenix/library/recentlyclosed/RecentlyClosedFragment.kt index aa1140f21c..01e2188f63 100644 --- a/app/src/main/java/org/mozilla/fenix/library/recentlyclosed/RecentlyClosedFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/library/recentlyclosed/RecentlyClosedFragment.kt @@ -83,7 +83,6 @@ class RecentlyClosedFragment : LibraryPageFragment() { store = requireComponents.core.store, activity = activity as HomeActivity, tabsUseCases = requireComponents.useCases.tabsUseCases, - sessionManager = requireComponents.core.sessionManager, resources = requireContext().resources, snackbar = FenixSnackbar.make( view = requireActivity().getRootView()!!, diff --git a/app/src/test/java/org/mozilla/fenix/library/recentlyclosed/DefaultRecentlyClosedControllerTest.kt b/app/src/test/java/org/mozilla/fenix/library/recentlyclosed/DefaultRecentlyClosedControllerTest.kt index f935731b93..98825ea993 100644 --- a/app/src/test/java/org/mozilla/fenix/library/recentlyclosed/DefaultRecentlyClosedControllerTest.kt +++ b/app/src/test/java/org/mozilla/fenix/library/recentlyclosed/DefaultRecentlyClosedControllerTest.kt @@ -17,7 +17,6 @@ import io.mockk.slot import io.mockk.verify import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.TestCoroutineDispatcher -import mozilla.components.browser.session.SessionManager import mozilla.components.browser.state.action.RecentlyClosedAction import mozilla.components.browser.state.state.recover.RecoverableTab import mozilla.components.browser.state.store.BrowserStore @@ -46,7 +45,6 @@ class DefaultRecentlyClosedControllerTest { private val snackbar: FenixSnackbar = mockk(relaxed = true) private val clipboardManager: ClipboardManager = mockk(relaxed = true) private val openToBrowser: (RecoverableTab, BrowsingMode?) -> Unit = mockk(relaxed = true) - private val sessionManager: SessionManager = mockk(relaxed = true) private val activity: HomeActivity = mockk(relaxed = true) private val store: BrowserStore = mockk(relaxed = true) private val tabsUseCases: TabsUseCases = mockk(relaxed = true) @@ -55,7 +53,6 @@ class DefaultRecentlyClosedControllerTest { private val controller = DefaultRecentlyClosedController( navController, store, - sessionManager, tabsUseCases, resources, snackbar,