From f71708e5c59306ed183140e11cbaa4fe34b430ab Mon Sep 17 00:00:00 2001 From: arkon Date: Wed, 22 Apr 2020 23:12:18 -0400 Subject: [PATCH] Group version info at top --- .../tachiyomi/ui/more/AboutController.kt | 66 ++++++++++--------- 1 file changed, 35 insertions(+), 31 deletions(-) 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 8d499a686..2600cc90a 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 @@ -25,6 +25,7 @@ import eu.kanade.tachiyomi.util.preference.defaultValue import eu.kanade.tachiyomi.util.preference.onChange import eu.kanade.tachiyomi.util.preference.onClick import eu.kanade.tachiyomi.util.preference.preference +import eu.kanade.tachiyomi.util.preference.preferenceCategory import eu.kanade.tachiyomi.util.preference.summaryRes import eu.kanade.tachiyomi.util.preference.switchPreference import eu.kanade.tachiyomi.util.preference.titleRes @@ -73,33 +74,6 @@ class AboutController : SettingsController() { isVisible = false } } - preference { - titleRes = R.string.website - val url = "https://tachiyomi.org" - summary = url - onClick { - val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url)) - startActivity(intent) - } - } - preference { - title = "Discord" - val url = "https://discord.gg/tachiyomi" - summary = url - onClick { - val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url)) - startActivity(intent) - } - } - preference { - title = "GitHub" - val url = "https://github.com/inorichi/tachiyomi" - summary = url - onClick { - val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url)) - startActivity(intent) - } - } preference { titleRes = R.string.version summary = if (BuildConfig.DEBUG) @@ -119,11 +93,41 @@ class AboutController : SettingsController() { ChangelogDialogController().showDialog(router) } } - preference { - titleRes = R.string.licenses - onClick { - startActivity(Intent(activity, OssLicensesMenuActivity::class.java)) + preferenceCategory { + preference { + titleRes = R.string.website + val url = "https://tachiyomi.org" + summary = url + onClick { + val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url)) + startActivity(intent) + } + } + preference { + title = "Discord" + val url = "https://discord.gg/tachiyomi" + summary = url + onClick { + val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url)) + startActivity(intent) + } + } + preference { + title = "GitHub" + val url = "https://github.com/inorichi/tachiyomi" + summary = url + onClick { + val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url)) + startActivity(intent) + } + } + preference { + titleRes = R.string.licenses + + onClick { + startActivity(Intent(activity, OssLicensesMenuActivity::class.java)) + } } } }