Skip to content

Commit 3c656f1

Browse files
authored
Don't show dax when favorites empty (Input Screen) (#6378)
Task/Issue URL: https://app.asana.com/1/137249556945/project/1208671518894266/task/1210771657899806?focus=true ### Description This reverts commit cba0692. ### Steps to test this PR - [ ] Enable Input Screen. - [ ] Focus omnibar (ensure you have no favorites). - [ ] Verify Dax logo is not visible.
1 parent 8883106 commit 3c656f1

File tree

4 files changed

+1
-20
lines changed

4 files changed

+1
-20
lines changed

duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/inputscreen/ui/tabs/SearchTabFragment.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ class SearchTabFragment : DuckDuckGoFragment(R.layout.fragment_search_tab) {
9191
val favoritesGridConfig = FavoritesGridConfig(
9292
isExpandable = false,
9393
showPlaceholders = false,
94-
showDaxWhenEmpty = true,
9594
placement = FavoritesPlacement.FOCUSED_STATE,
9695
)
9796
favoritesView = savedSitesViewsProvider.getFavoritesGridView(requireContext(), config = favoritesGridConfig)

saved-sites/saved-sites-api/src/main/java/com/duckduckgo/savedsites/api/views/SavedSitesViewsProvider.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,12 @@ interface SavedSitesViewsProvider {
3535
*
3636
* @property isExpandable If true and there are two or more rows, the favorites are collapsed and can be expanded.
3737
* If false, the favorites are always expanded.
38-
* @property showPlaceholders Whether to show placeholder with onboarding if favorites list is empty. Takes precedent over [showDaxWhenEmpty].
39-
* @property showDaxWhenEmpty Whether to show Dax icon if favorites list is empty.
38+
* @property showPlaceholders Whether to show placeholder with onboarding if favorites list is empty.
4039
* @property placement The screen on which favorites are displayed.
4140
*/
4241
data class FavoritesGridConfig(
4342
val isExpandable: Boolean,
4443
val showPlaceholders: Boolean,
45-
val showDaxWhenEmpty: Boolean,
4644
val placement: FavoritesPlacement,
4745
)
4846

saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/newtab/FavouritesNewTabSectionView.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import android.widget.LinearLayout
2828
import android.widget.PopupWindow
2929
import androidx.core.text.HtmlCompat
3030
import androidx.core.text.toSpannable
31-
import androidx.core.view.isVisible
3231
import androidx.fragment.app.FragmentManager
3332
import androidx.lifecycle.ViewModelProvider
3433
import androidx.lifecycle.findViewTreeLifecycleOwner
@@ -113,7 +112,6 @@ class FavouritesNewTabSectionView @JvmOverloads constructor(
113112

114113
private var isExpandable = true
115114
private var showPlaceholders = false
116-
private var showDaxWhenEmpty = false
117115
private var placement: FavoritesPlacement = FavoritesPlacement.NEW_TAB_PAGE
118116

119117
private val binding: ViewNewTabFavouritesSectionBinding by viewBinding()
@@ -154,7 +152,6 @@ class FavouritesNewTabSectionView @JvmOverloads constructor(
154152
config?.let {
155153
isExpandable = it.isExpandable
156154
showPlaceholders = it.showPlaceholders
157-
showDaxWhenEmpty = it.showDaxWhenEmpty
158155
placement = it.placement
159156
}
160157
}
@@ -357,7 +354,6 @@ class FavouritesNewTabSectionView @JvmOverloads constructor(
357354
}
358355
viewModel.onNewTabFavouritesShown()
359356
}
360-
binding.ddgLogo.isVisible = showDaxWhenEmpty && viewState.favourites.isEmpty()
361357
}
362358

363359
private fun processCommands(command: Command) {

saved-sites/saved-sites-impl/src/main/res/layout/view_new_tab_favourites_section.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,6 @@
2020
android:layout_height="wrap_content"
2121
android:orientation="vertical">
2222

23-
<ImageView
24-
android:id="@+id/ddgLogo"
25-
android:layout_height="wrap_content"
26-
android:layout_width="@dimen/ntpDaxLogoIconWidth"
27-
android:layout_marginTop="@dimen/homeTabDdgLogoTopMargin"
28-
android:adjustViewBounds="true"
29-
android:maxWidth="180dp"
30-
android:maxHeight="180dp"
31-
app:srcCompat="@drawable/logo_full"
32-
android:visibility="gone"
33-
android:layout_gravity="center_horizontal" />
34-
3523
<LinearLayout
3624
android:id="@+id/sectionHeaderLayout"
3725
android:layout_width="match_parent"

0 commit comments

Comments
 (0)