From e691e17efc0a6c857a925bf4077f0eb3541d570b Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 23 Apr 2022 18:34:06 -0400 Subject: [PATCH] Remove unused preference layouts --- .../tachiyomi/ui/more/AboutController.kt | 4 +- .../tachiyomi/ui/more/AboutLinksPreference.kt | 47 ------------ .../tachiyomi/ui/more/MoreHeaderPreference.kt | 15 ---- app/src/main/res/layout/pref_about_links.xml | 74 ------------------- app/src/main/res/layout/pref_more_header.xml | 23 ------ 5 files changed, 1 insertion(+), 162 deletions(-) delete mode 100644 app/src/main/java/eu/kanade/tachiyomi/ui/more/AboutLinksPreference.kt delete mode 100644 app/src/main/java/eu/kanade/tachiyomi/ui/more/MoreHeaderPreference.kt delete mode 100644 app/src/main/res/layout/pref_about_links.xml delete mode 100644 app/src/main/res/layout/pref_more_header.xml diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/more/AboutController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/more/AboutController.kt index 3f2384d4fa..10b5207459 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/more/AboutController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/more/AboutController.kt @@ -35,9 +35,7 @@ class AboutController : BasicComposeController(), NoAppBarElevationController { nestedScrollInterop = nestedScrollInterop, checkVersion = this::checkVersion, getFormattedBuildTime = this::getFormattedBuildTime, - onClickLicenses = { - router.pushController(LicensesController()) - }, + onClickLicenses = { router.pushController(LicensesController()) }, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/more/AboutLinksPreference.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/more/AboutLinksPreference.kt deleted file mode 100644 index 182f050f6a..0000000000 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/more/AboutLinksPreference.kt +++ /dev/null @@ -1,47 +0,0 @@ -package eu.kanade.tachiyomi.ui.more - -import android.content.Context -import android.util.AttributeSet -import androidx.preference.Preference -import androidx.preference.PreferenceViewHolder -import eu.kanade.tachiyomi.R -import eu.kanade.tachiyomi.util.system.openInBrowser -import eu.kanade.tachiyomi.util.view.setTooltip - -class AboutLinksPreference @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : - Preference(context, attrs) { - - init { - layoutResource = R.layout.pref_about_links - isSelectable = false - } - - override fun onBindViewHolder(holder: PreferenceViewHolder) { - super.onBindViewHolder(holder) - - holder.findViewById(R.id.btn_website).apply { - setTooltip(contentDescription.toString()) - setOnClickListener { context.openInBrowser("https://tachiyomi.org") } - } - holder.findViewById(R.id.btn_discord).apply { - setTooltip(contentDescription.toString()) - setOnClickListener { context.openInBrowser("https://discord.gg/tachiyomi") } - } - holder.findViewById(R.id.btn_twitter).apply { - setTooltip(contentDescription.toString()) - setOnClickListener { context.openInBrowser("https://twitter.com/tachiyomiorg") } - } - holder.findViewById(R.id.btn_facebook).apply { - setTooltip(contentDescription.toString()) - setOnClickListener { context.openInBrowser("https://facebook.com/tachiyomiorg") } - } - holder.findViewById(R.id.btn_reddit).apply { - setTooltip(contentDescription.toString()) - setOnClickListener { context.openInBrowser("https://www.reddit.com/r/Tachiyomi") } - } - holder.findViewById(R.id.btn_github).apply { - setTooltip(contentDescription.toString()) - setOnClickListener { context.openInBrowser("https://github.com/tachiyomiorg") } - } - } -} diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/more/MoreHeaderPreference.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/more/MoreHeaderPreference.kt deleted file mode 100644 index 2cef50320c..0000000000 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/more/MoreHeaderPreference.kt +++ /dev/null @@ -1,15 +0,0 @@ -package eu.kanade.tachiyomi.ui.more - -import android.content.Context -import android.util.AttributeSet -import androidx.preference.Preference -import eu.kanade.tachiyomi.R - -class MoreHeaderPreference @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : - Preference(context, attrs) { - - init { - layoutResource = R.layout.pref_more_header - isSelectable = false - } -} diff --git a/app/src/main/res/layout/pref_about_links.xml b/app/src/main/res/layout/pref_about_links.xml deleted file mode 100644 index 67d262431d..0000000000 --- a/app/src/main/res/layout/pref_about_links.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/pref_more_header.xml b/app/src/main/res/layout/pref_more_header.xml deleted file mode 100644 index 484d11f586..0000000000 --- a/app/src/main/res/layout/pref_more_header.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - -