From 335a430d22aa07c713b66e425b3a570578086116 Mon Sep 17 00:00:00 2001 From: Matthew Kevins Date: Wed, 27 Apr 2022 07:54:01 +1000 Subject: [PATCH 001/111] Remove thumbnail mode selector from design picker --- .../ui/sitecreation/theme/HomePagePickerFragment.kt | 11 ----------- .../src/main/res/layout/home_page_picker_titlebar.xml | 10 ---------- 2 files changed, 21 deletions(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/theme/HomePagePickerFragment.kt b/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/theme/HomePagePickerFragment.kt index d301592cdf65..986f93353380 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/theme/HomePagePickerFragment.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/theme/HomePagePickerFragment.kt @@ -15,7 +15,6 @@ import com.google.android.material.appbar.AppBarLayout import org.wordpress.android.R import org.wordpress.android.WordPress import org.wordpress.android.databinding.HomePagePickerFragmentBinding -import org.wordpress.android.ui.PreviewModeSelectorPopup import org.wordpress.android.ui.layoutpicker.CategoriesAdapter import org.wordpress.android.ui.layoutpicker.LayoutCategoryAdapter import org.wordpress.android.ui.layoutpicker.LayoutPickerUiState @@ -43,7 +42,6 @@ class HomePagePickerFragment : Fragment() { @Inject lateinit var siteNameFeatureConfig: SiteNameFeatureConfig @Inject lateinit var viewModelFactory: ViewModelProvider.Factory private lateinit var viewModel: HomePagePickerViewModel - private lateinit var previewModeSelectorPopup: PreviewModeSelectorPopup override fun onAttach(context: Context) { super.onAttach(context) @@ -83,10 +81,6 @@ class HomePagePickerFragment : Fragment() { setupUi() setupViewModel() setupActionListeners() - previewModeSelectorPopup = PreviewModeSelectorPopup( - requireActivity(), - homePagePickerTitlebar.previewTypeSelectorButton - ) } } @@ -132,10 +126,6 @@ class HomePagePickerFragment : Fragment() { } }) - viewModel.onThumbnailModeButtonPressed.observe(viewLifecycleOwner, { - previewModeSelectorPopup.show(viewModel) - }) - viewModel.onCategorySelectionChanged.observeEvent(viewLifecycleOwner, { layoutsRecyclerView.smoothScrollToPosition(0) }) @@ -178,7 +168,6 @@ class HomePagePickerFragment : Fragment() { homePagePickerTitlebar.skipButton.setOnClickListener { viewModel.onSkippedTapped() } errorView.button.setOnClickListener { viewModel.onRetryClicked() } homePagePickerTitlebar.backButton.setOnClickListener { viewModel.onBackPressed() } - homePagePickerTitlebar.previewTypeSelectorButton.setOnClickListener { viewModel.onThumbnailModePressed() } setScrollListener() } diff --git a/WordPress/src/main/res/layout/home_page_picker_titlebar.xml b/WordPress/src/main/res/layout/home_page_picker_titlebar.xml index c5584a073539..1cca93fc5537 100644 --- a/WordPress/src/main/res/layout/home_page_picker_titlebar.xml +++ b/WordPress/src/main/res/layout/home_page_picker_titlebar.xml @@ -22,16 +22,6 @@ android:paddingEnd="0dp" android:text="@string/hpp_title" /> - -