mirror of
https://github.com/mihonapp/mihon.git
synced 2025-07-15 12:13:18 +02:00
Add icons for links in the About section (#5117)
* Add an icon for each link in About * Add icon for Open source licenses * Reorder Facebook and Discord * Revert "Add icon for Open source licenses" This reverts commit 9b73f8443d1afea60f8bc4165663c8bef0ebf108.
This commit is contained in:
@ -17,11 +17,14 @@ import eu.kanade.tachiyomi.ui.setting.SettingsController
|
||||
import eu.kanade.tachiyomi.util.CrashLogUtil
|
||||
import eu.kanade.tachiyomi.util.lang.launchNow
|
||||
import eu.kanade.tachiyomi.util.lang.toDateTimestampString
|
||||
import eu.kanade.tachiyomi.util.preference.iconRes
|
||||
import eu.kanade.tachiyomi.util.preference.iconTint
|
||||
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.titleRes
|
||||
import eu.kanade.tachiyomi.util.system.copyToClipboard
|
||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
import eu.kanade.tachiyomi.util.system.toast
|
||||
import timber.log.Timber
|
||||
import java.text.DateFormat
|
||||
@ -41,6 +44,8 @@ class AboutController : SettingsController() {
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = screen.apply {
|
||||
titleRes = R.string.pref_category_about
|
||||
|
||||
val tintColor = context.getResourceColor(R.attr.colorAccent)
|
||||
|
||||
preference {
|
||||
key = "pref_about_version"
|
||||
titleRes = R.string.version
|
||||
@ -83,38 +88,48 @@ class AboutController : SettingsController() {
|
||||
preference {
|
||||
key = "pref_about_website"
|
||||
titleRes = R.string.website
|
||||
iconRes = R.drawable.ic_earth_24dp
|
||||
iconTint = tintColor
|
||||
"https://tachiyomi.org".also {
|
||||
summary = it
|
||||
onClick { openInBrowser(it) }
|
||||
}
|
||||
}
|
||||
preference {
|
||||
key = "pref_about_facebook"
|
||||
title = "Facebook"
|
||||
"https://facebook.com/tachiyomiorg".also {
|
||||
summary = it
|
||||
onClick { openInBrowser(it) }
|
||||
}
|
||||
}
|
||||
preference {
|
||||
key = "pref_about_twitter"
|
||||
title = "Twitter"
|
||||
"https://twitter.com/tachiyomiorg".also {
|
||||
summary = it
|
||||
onClick { openInBrowser(it) }
|
||||
}
|
||||
}
|
||||
preference {
|
||||
key = "pref_about_discord"
|
||||
title = "Discord"
|
||||
iconRes = R.drawable.ic_discord_24dp
|
||||
iconTint = tintColor
|
||||
"https://discord.gg/tachiyomi".also {
|
||||
summary = it
|
||||
onClick { openInBrowser(it) }
|
||||
}
|
||||
}
|
||||
preference {
|
||||
key = "pref_about_twitter"
|
||||
title = "Twitter"
|
||||
iconRes = R.drawable.ic_twitter_24dp
|
||||
iconTint = tintColor
|
||||
"https://twitter.com/tachiyomiorg".also {
|
||||
summary = it
|
||||
onClick { openInBrowser(it) }
|
||||
}
|
||||
}
|
||||
preference {
|
||||
key = "pref_about_facebook"
|
||||
title = "Facebook"
|
||||
iconRes = R.drawable.ic_facebook_24dp
|
||||
iconTint = tintColor
|
||||
"https://facebook.com/tachiyomiorg".also {
|
||||
summary = it
|
||||
onClick { openInBrowser(it) }
|
||||
}
|
||||
}
|
||||
preference {
|
||||
key = "pref_about_github"
|
||||
title = "GitHub"
|
||||
iconRes = R.drawable.ic_github_24dp
|
||||
iconTint = tintColor
|
||||
"https://github.com/tachiyomiorg".also {
|
||||
summary = it
|
||||
onClick { openInBrowser(it) }
|
||||
|
Reference in New Issue
Block a user