For #21756 - Refactor TopSites out of home.sessioncontrol
This commit is contained in:
parent
1f97ca6ce6
commit
04e75ace19
|
@ -118,7 +118,7 @@ import org.mozilla.fenix.home.sessioncontrol.SessionControlView
|
|||
import org.mozilla.fenix.home.sessioncontrol.viewholders.CollectionViewHolder
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.pocket.DefaultPocketStoriesController
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.pocket.PocketRecommendedStoriesCategory
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.topsites.DefaultTopSitesView
|
||||
import org.mozilla.fenix.home.topsites.DefaultTopSitesView
|
||||
import org.mozilla.fenix.onboarding.FenixOnboarding
|
||||
import org.mozilla.fenix.settings.SupportUtils
|
||||
import org.mozilla.fenix.settings.SupportUtils.SumoTopic.HELP
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.mozilla.fenix.home.sessioncontrol.viewholders.CustomizeHomeButtonView
|
|||
import org.mozilla.fenix.home.sessioncontrol.viewholders.NoCollectionsMessageViewHolder
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.PrivateBrowsingDescriptionViewHolder
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.TabInCollectionViewHolder
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.TopSitePagerViewHolder
|
||||
import org.mozilla.fenix.home.topsites.TopSitePagerViewHolder
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.onboarding.ExperimentDefaultBrowserCardViewHolder
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.onboarding.OnboardingAutomaticSignInViewHolder
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.onboarding.OnboardingFinishViewHolder
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.home.sessioncontrol.viewholders.topsites
|
||||
package org.mozilla.fenix.home.topsites
|
||||
|
||||
import mozilla.components.feature.top.sites.TopSite
|
||||
import mozilla.components.feature.top.sites.view.TopSitesView
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.home.sessioncontrol.viewholders.topsites
|
||||
package org.mozilla.fenix.home.topsites
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.home.sessioncontrol.viewholders.topsites
|
||||
package org.mozilla.fenix.home.topsites
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.home.sessioncontrol.viewholders
|
||||
package org.mozilla.fenix.home.topsites
|
||||
|
||||
import android.view.View
|
||||
import androidx.core.view.isVisible
|
||||
|
@ -15,7 +15,6 @@ import org.mozilla.fenix.databinding.ComponentTopSitesPagerBinding
|
|||
import org.mozilla.fenix.ext.components
|
||||
import org.mozilla.fenix.home.sessioncontrol.AdapterItem
|
||||
import org.mozilla.fenix.home.sessioncontrol.TopSiteInteractor
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.topsites.TopSitesPagerAdapter
|
||||
|
||||
class TopSitePagerViewHolder(
|
||||
view: View,
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.home.sessioncontrol.viewholders
|
||||
package org.mozilla.fenix.home.topsites
|
||||
|
||||
import android.view.View
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -10,7 +10,6 @@ import mozilla.components.feature.top.sites.TopSite
|
|||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.databinding.ComponentTopSitesBinding
|
||||
import org.mozilla.fenix.home.sessioncontrol.TopSiteInteractor
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.topsites.TopSitesAdapter
|
||||
import org.mozilla.fenix.utils.AccessibilityGridLayoutManager
|
||||
|
||||
class TopSiteViewHolder(
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.home.sessioncontrol.viewholders.topsites
|
||||
package org.mozilla.fenix.home.topsites
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.home.sessioncontrol.viewholders.topsites
|
||||
package org.mozilla.fenix.home.topsites
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
|
@ -12,8 +12,7 @@ import androidx.recyclerview.widget.ListAdapter
|
|||
import mozilla.components.feature.top.sites.TopSite
|
||||
import org.mozilla.fenix.home.sessioncontrol.AdapterItem.TopSitePagerPayload
|
||||
import org.mozilla.fenix.home.sessioncontrol.TopSiteInteractor
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.TopSitePagerViewHolder.Companion.TOP_SITES_PER_PAGE
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.TopSiteViewHolder
|
||||
import org.mozilla.fenix.home.topsites.TopSitePagerViewHolder.Companion.TOP_SITES_PER_PAGE
|
||||
|
||||
class TopSitesPagerAdapter(
|
||||
private val interactor: TopSiteInteractor
|
|
@ -10,7 +10,7 @@ import androidx.core.view.doOnPreDraw
|
|||
import mozilla.components.support.ktx.android.view.reportFullyDrawnSafe
|
||||
import org.mozilla.fenix.HomeActivity
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.topsites.TopSiteItemViewHolder
|
||||
import org.mozilla.fenix.home.topsites.TopSiteItemViewHolder
|
||||
import org.mozilla.fenix.perf.StartupTimelineStateMachine.StartupDestination.APP_LINK
|
||||
import org.mozilla.fenix.perf.StartupTimelineStateMachine.StartupDestination.HOMESCREEN
|
||||
import org.mozilla.fenix.perf.StartupTimelineStateMachine.StartupState
|
||||
|
|
|
@ -6,7 +6,7 @@ package org.mozilla.fenix.perf
|
|||
|
||||
import androidx.annotation.UiThread
|
||||
import org.mozilla.fenix.HomeActivity
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.topsites.TopSiteItemViewHolder
|
||||
import org.mozilla.fenix.home.topsites.TopSiteItemViewHolder
|
||||
import org.mozilla.fenix.perf.StartupTimeline.onApplicationInit
|
||||
import org.mozilla.fenix.perf.StartupTimelineStateMachine.StartupActivity
|
||||
import org.mozilla.fenix.perf.StartupTimelineStateMachine.StartupDestination
|
||||
|
|
|
@ -17,7 +17,7 @@ import org.mozilla.fenix.databinding.InactiveTabListItemBinding
|
|||
import org.mozilla.fenix.ext.components
|
||||
import org.mozilla.fenix.ext.loadIntoView
|
||||
import org.mozilla.fenix.ext.toShortUrl
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.topsites.dpToPx
|
||||
import org.mozilla.fenix.home.topsites.dpToPx
|
||||
import org.mozilla.fenix.tabstray.TabsTrayInteractor
|
||||
import org.mozilla.fenix.tabstray.browser.AutoCloseInterval.Manual
|
||||
import org.mozilla.fenix.tabstray.browser.AutoCloseInterval.OneDay
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.mozilla.fenix.R
|
|||
import org.mozilla.fenix.databinding.TabTrayGridItemBinding
|
||||
import org.mozilla.fenix.databinding.TabTrayItemBinding
|
||||
import org.mozilla.fenix.ext.components
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.topsites.dpToPx
|
||||
import org.mozilla.fenix.home.topsites.dpToPx
|
||||
import org.mozilla.fenix.selection.SelectionHolder
|
||||
import org.mozilla.fenix.tabstray.TabsTrayStore
|
||||
import org.mozilla.fenix.tabstray.ext.MIN_COLUMN_WIDTH_DP
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<org.mozilla.fenix.home.sessioncontrol.viewholders.topsites.PagerIndicator
|
||||
<org.mozilla.fenix.home.topsites.PagerIndicator
|
||||
android:id="@+id/page_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="6dp"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.home.sessioncontrol.viewholders.topsites
|
||||
package org.mozilla.fenix.home.topsites
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import io.mockk.mockk
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.home.sessioncontrol.viewholders
|
||||
package org.mozilla.fenix.home.topsites
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import io.mockk.mockk
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.home.sessioncontrol.viewholders.topsites
|
||||
package org.mozilla.fenix.home.topsites
|
||||
|
||||
import mozilla.components.feature.top.sites.TopSite
|
||||
import org.junit.Assert.assertEquals
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.home.sessioncontrol.viewholders.topsites
|
||||
package org.mozilla.fenix.home.topsites
|
||||
|
||||
import io.mockk.Runs
|
||||
import io.mockk.every
|
|
@ -26,7 +26,7 @@ import org.mozilla.fenix.HomeActivity
|
|||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.databinding.TopSiteItemBinding
|
||||
import org.mozilla.fenix.helpers.FenixRobolectricTestRunner
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.topsites.TopSiteItemViewHolder
|
||||
import org.mozilla.fenix.home.topsites.TopSiteItemViewHolder
|
||||
import org.mozilla.fenix.perf.StartupTimelineStateMachine.StartupDestination
|
||||
import org.mozilla.fenix.perf.StartupTimelineStateMachine.StartupState
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user