From 38e2e938e24b158ba9b43c2026186ae2e4af6e9f Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Tue, 16 Dec 2025 13:07:22 +0800 Subject: [PATCH] epoxy: Drop unused views and controllers Signed-off-by: Aayush Gupta --- .../controller/DetailsCarouselController.kt | 45 ----------- .../EarlyAccessCarouselController.kt | 30 ------- .../controller/SearchCarouselController.kt | 80 ------------------- .../store/view/epoxy/views/EpoxyTextView.kt | 56 ------------- .../store/view/epoxy/views/TextDividerView.kt | 42 ---------- .../view/epoxy/views/app/NoAppAltView.kt | 45 ----------- app/src/main/res/layout/layout_permission.xml | 44 ---------- app/src/main/res/layout/view_device.xml | 58 -------------- app/src/main/res/layout/view_no_app_alt.xml | 33 -------- app/src/main/res/layout/view_text.xml | 25 ------ app/src/main/res/layout/view_text_divider.xml | 35 -------- 11 files changed, 493 deletions(-) delete mode 100644 app/src/main/java/com/aurora/store/view/epoxy/controller/DetailsCarouselController.kt delete mode 100644 app/src/main/java/com/aurora/store/view/epoxy/controller/EarlyAccessCarouselController.kt delete mode 100644 app/src/main/java/com/aurora/store/view/epoxy/controller/SearchCarouselController.kt delete mode 100644 app/src/main/java/com/aurora/store/view/epoxy/views/EpoxyTextView.kt delete mode 100644 app/src/main/java/com/aurora/store/view/epoxy/views/TextDividerView.kt delete mode 100644 app/src/main/java/com/aurora/store/view/epoxy/views/app/NoAppAltView.kt delete mode 100644 app/src/main/res/layout/layout_permission.xml delete mode 100644 app/src/main/res/layout/view_device.xml delete mode 100644 app/src/main/res/layout/view_no_app_alt.xml delete mode 100644 app/src/main/res/layout/view_text.xml delete mode 100644 app/src/main/res/layout/view_text_divider.xml diff --git a/app/src/main/java/com/aurora/store/view/epoxy/controller/DetailsCarouselController.kt b/app/src/main/java/com/aurora/store/view/epoxy/controller/DetailsCarouselController.kt deleted file mode 100644 index 299b2ae38..000000000 --- a/app/src/main/java/com/aurora/store/view/epoxy/controller/DetailsCarouselController.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Aurora Store - * Copyright (C) 2021, Rahul Kumar Patel - * - * Aurora Store is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * Aurora Store is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Aurora Store. If not, see . - * - */ - -package com.aurora.store.view.epoxy.controller - -import com.aurora.gplayapi.data.models.StreamBundle -import com.aurora.store.view.epoxy.groups.CarouselModelGroup -import com.aurora.store.view.epoxy.groups.CarouselShimmerGroup - -class DetailsCarouselController(private val callbacks: Callbacks) : - GenericCarouselController(callbacks) { - - override fun buildModels(streamBundle: StreamBundle?) { - setFilterDuplicates(true) - if (streamBundle == null) { - for (i in 1..2) { - add( - CarouselShimmerGroup() - .id(i) - ) - } - } else { - streamBundle.streamClusters.values.filter { applyFilter(it) } - .forEach { streamCluster -> - add(CarouselModelGroup(streamCluster, callbacks)) - } - } - } -} \ No newline at end of file diff --git a/app/src/main/java/com/aurora/store/view/epoxy/controller/EarlyAccessCarouselController.kt b/app/src/main/java/com/aurora/store/view/epoxy/controller/EarlyAccessCarouselController.kt deleted file mode 100644 index cf93bccf8..000000000 --- a/app/src/main/java/com/aurora/store/view/epoxy/controller/EarlyAccessCarouselController.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Aurora Store - * Copyright (C) 2021, Rahul Kumar Patel - * - * Aurora Store is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * Aurora Store is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Aurora Store. If not, see . - * - */ - -package com.aurora.store.view.epoxy.controller - -import com.aurora.gplayapi.data.models.StreamCluster - -class EarlyAccessCarouselController(callbacks: Callbacks) : GenericCarouselController(callbacks) { - - override fun applyFilter(streamBundle: StreamCluster): Boolean { - return streamBundle.clusterTitle.isNotBlank() //Filter noisy cluster - && streamBundle.clusterAppList.isNotEmpty() //Filter empty clusters - } -} \ No newline at end of file diff --git a/app/src/main/java/com/aurora/store/view/epoxy/controller/SearchCarouselController.kt b/app/src/main/java/com/aurora/store/view/epoxy/controller/SearchCarouselController.kt deleted file mode 100644 index 2662edcf7..000000000 --- a/app/src/main/java/com/aurora/store/view/epoxy/controller/SearchCarouselController.kt +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Aurora Store - * Copyright (C) 2021, Rahul Kumar Patel - * - * Aurora Store is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * Aurora Store is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Aurora Store. If not, see . - * - */ - -package com.aurora.store.view.epoxy.controller - -import com.airbnb.epoxy.TypedEpoxyController -import com.aurora.gplayapi.data.models.StreamBundle -import com.aurora.store.R -import com.aurora.store.view.epoxy.controller.GenericCarouselController.Callbacks -import com.aurora.store.view.epoxy.groups.CarouselModelGroup -import com.aurora.store.view.epoxy.views.app.AppListViewModel_ -import com.aurora.store.view.epoxy.views.app.NoAppViewModel_ -import com.aurora.store.view.epoxy.views.shimmer.AppListViewShimmerModel_ - -open class SearchCarouselController(private val callbacks: Callbacks) : - - TypedEpoxyController() { - - override fun buildModels(streamBundle: StreamBundle?) { - setFilterDuplicates(true) - if (streamBundle == null) { - for (i in 1..6) { - add( - AppListViewShimmerModel_() - .id(i) - ) - } - } else { - if (streamBundle.streamClusters.isEmpty()) { - add( - NoAppViewModel_() - .id("no_app") - .icon(R.drawable.ic_apps) - .message(R.string.no_apps_available) - ) - } else { - streamBundle.streamClusters.values - .filter { it.clusterAppList.isNotEmpty() } // Filter out empty clusters, mostly related keywords - .forEach { - if (it.clusterTitle.isEmpty() or (it.clusterTitle == streamBundle.streamTitle)) { - if (it.clusterAppList.isNotEmpty()) { - it.clusterAppList.forEach { app -> - add( - AppListViewModel_() - .id(app.id) - .app(app) - .click { _ -> callbacks.onAppClick(app) } - ) - } - } - } else { - add(CarouselModelGroup(it, callbacks)) - } - } - - if (streamBundle.hasNext()) - add( - AppListViewShimmerModel_() - .id("progress") - ) - } - } - } -} diff --git a/app/src/main/java/com/aurora/store/view/epoxy/views/EpoxyTextView.kt b/app/src/main/java/com/aurora/store/view/epoxy/views/EpoxyTextView.kt deleted file mode 100644 index a6b6a509b..000000000 --- a/app/src/main/java/com/aurora/store/view/epoxy/views/EpoxyTextView.kt +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Aurora Store - * Copyright (C) 2021, Rahul Kumar Patel - * - * Aurora Store is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * Aurora Store is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Aurora Store. If not, see . - * - */ - -package com.aurora.store.view.epoxy.views - -import android.content.Context -import android.util.AttributeSet -import android.util.TypedValue -import com.airbnb.epoxy.ModelProp -import com.airbnb.epoxy.ModelView -import com.aurora.store.R -import com.aurora.store.databinding.ViewTextBinding - -@ModelView( - autoLayout = ModelView.Size.MATCH_WIDTH_WRAP_HEIGHT, - baseModelClass = BaseModel::class -) -class EpoxyTextView @JvmOverloads constructor( - context: Context?, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : BaseView(context, attrs, defStyleAttr) { - - @ModelProp - fun title(title: String) { - binding.txtView.text = title - } - - @ModelProp - @JvmOverloads - fun size(int: Int = 16) { - binding.txtView.setTextSize(TypedValue.COMPLEX_UNIT_SP, int.toFloat()) - } - - @ModelProp - @JvmOverloads - fun style(resId: Int = R.style.AuroraTextStyle) { - binding.txtView.setTextAppearance(context, resId) - } -} diff --git a/app/src/main/java/com/aurora/store/view/epoxy/views/TextDividerView.kt b/app/src/main/java/com/aurora/store/view/epoxy/views/TextDividerView.kt deleted file mode 100644 index 1317b5465..000000000 --- a/app/src/main/java/com/aurora/store/view/epoxy/views/TextDividerView.kt +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Aurora Store - * Copyright (C) 2021, Rahul Kumar Patel - * - * Aurora Store is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * Aurora Store is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Aurora Store. If not, see . - * - */ - -package com.aurora.store.view.epoxy.views - -import android.content.Context -import android.util.AttributeSet -import com.airbnb.epoxy.ModelProp -import com.airbnb.epoxy.ModelView -import com.aurora.store.databinding.ViewTextDividerBinding - -@ModelView( - autoLayout = ModelView.Size.MATCH_WIDTH_WRAP_HEIGHT, - baseModelClass = BaseModel::class -) -class TextDividerView @JvmOverloads constructor( - context: Context?, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : BaseView(context, attrs, defStyleAttr) { - - @ModelProp - fun title(title: String) { - binding.txtTitle.text = title - } -} diff --git a/app/src/main/java/com/aurora/store/view/epoxy/views/app/NoAppAltView.kt b/app/src/main/java/com/aurora/store/view/epoxy/views/app/NoAppAltView.kt deleted file mode 100644 index 0575683a9..000000000 --- a/app/src/main/java/com/aurora/store/view/epoxy/views/app/NoAppAltView.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Aurora Store - * Copyright (C) 2021, Rahul Kumar Patel - * - * Aurora Store is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * Aurora Store is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Aurora Store. If not, see . - * - */ - -package com.aurora.store.view.epoxy.views.app - -import android.content.Context -import android.util.AttributeSet -import com.airbnb.epoxy.ModelProp -import com.airbnb.epoxy.ModelView -import com.aurora.store.databinding.ViewNoAppAltBinding -import com.aurora.store.view.epoxy.views.BaseModel -import com.aurora.store.view.epoxy.views.BaseView - - -@ModelView( - autoLayout = ModelView.Size.MATCH_WIDTH_WRAP_HEIGHT, - baseModelClass = BaseModel::class -) -class NoAppAltView @JvmOverloads constructor( - context: Context?, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : BaseView(context, attrs, defStyleAttr) { - - @ModelProp - fun message(message: String) { - binding.txtMsg.text = message - } -} diff --git a/app/src/main/res/layout/layout_permission.xml b/app/src/main/res/layout/layout_permission.xml deleted file mode 100644 index d1b7a472b..000000000 --- a/app/src/main/res/layout/layout_permission.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - diff --git a/app/src/main/res/layout/view_device.xml b/app/src/main/res/layout/view_device.xml deleted file mode 100644 index 66005edb0..000000000 --- a/app/src/main/res/layout/view_device.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/view_no_app_alt.xml b/app/src/main/res/layout/view_no_app_alt.xml deleted file mode 100644 index d0d347892..000000000 --- a/app/src/main/res/layout/view_no_app_alt.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/view_text.xml b/app/src/main/res/layout/view_text.xml deleted file mode 100644 index ac3c3b82d..000000000 --- a/app/src/main/res/layout/view_text.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - diff --git a/app/src/main/res/layout/view_text_divider.xml b/app/src/main/res/layout/view_text_divider.xml deleted file mode 100644 index 9ac907296..000000000 --- a/app/src/main/res/layout/view_text_divider.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - -