mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-29 08:38:09 +00:00
Update contributors in app
This commit is contained in:
@@ -4,42 +4,63 @@ import com.topjohnwu.magisk.R
|
||||
import com.topjohnwu.magisk.core.Const
|
||||
import com.topjohnwu.magisk.databinding.RvItem
|
||||
|
||||
sealed class DeveloperItem {
|
||||
|
||||
abstract val items: List<IconLink>
|
||||
abstract val name: Int
|
||||
|
||||
object Main : DeveloperItem() {
|
||||
override val items =
|
||||
listOf(
|
||||
IconLink.Twitter.Main,
|
||||
IconLink.Patreon,
|
||||
IconLink.PayPal.Main,
|
||||
IconLink.Github
|
||||
)
|
||||
override val name get() = R.string.topjohnwu
|
||||
}
|
||||
|
||||
object App : DeveloperItem() {
|
||||
override val items =
|
||||
listOf<IconLink>(
|
||||
IconLink.Twitter.App,
|
||||
IconLink.PayPal.App
|
||||
)
|
||||
override val name get() = R.string.diareuse
|
||||
}
|
||||
}
|
||||
|
||||
private interface Dev {
|
||||
interface Dev {
|
||||
val name: String
|
||||
}
|
||||
|
||||
private interface MainDev: Dev {
|
||||
private interface JohnImpl : Dev {
|
||||
override val name get() = "topjohnwu"
|
||||
}
|
||||
|
||||
private interface AppDev: Dev {
|
||||
override val name get() = "diareuse"
|
||||
private interface VvbImpl : Dev {
|
||||
override val name get() = "vvb2060"
|
||||
}
|
||||
|
||||
private interface YUImpl : Dev {
|
||||
override val name get() = "yujincheng08"
|
||||
}
|
||||
|
||||
private interface RikkaImpl : Dev {
|
||||
override val name get() = "RikkaW"
|
||||
}
|
||||
|
||||
sealed class DeveloperItem : Dev {
|
||||
|
||||
abstract val items: List<IconLink>
|
||||
val handle get() = "@${name}"
|
||||
|
||||
object John : DeveloperItem(), JohnImpl {
|
||||
override val items =
|
||||
listOf(
|
||||
object : IconLink.Twitter(), JohnImpl {},
|
||||
IconLink.Github.Project
|
||||
)
|
||||
}
|
||||
|
||||
object Vvb : DeveloperItem(), VvbImpl {
|
||||
override val items =
|
||||
listOf<IconLink>(
|
||||
object : IconLink.Twitter(), VvbImpl {},
|
||||
object : IconLink.Github.User(), VvbImpl {}
|
||||
)
|
||||
}
|
||||
|
||||
object YU : DeveloperItem(), YUImpl {
|
||||
override val items =
|
||||
listOf<IconLink>(
|
||||
object : IconLink.Twitter() { override val name = "shanasaimoe" },
|
||||
object : IconLink.Github.User(), YUImpl {},
|
||||
object : IconLink.Sponsor(), YUImpl {}
|
||||
)
|
||||
}
|
||||
|
||||
object Rikka : DeveloperItem(), RikkaImpl {
|
||||
override val items =
|
||||
listOf<IconLink>(
|
||||
object : IconLink.Twitter() { override val name = "rikkawww" },
|
||||
object : IconLink.Github.User(), RikkaImpl {}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
sealed class IconLink : RvItem() {
|
||||
@@ -50,14 +71,12 @@ sealed class IconLink : RvItem() {
|
||||
|
||||
override val layoutRes get() = R.layout.item_icon_link
|
||||
|
||||
sealed class PayPal : IconLink(), Dev {
|
||||
abstract class PayPal : IconLink(), Dev {
|
||||
override val icon get() = R.drawable.ic_paypal
|
||||
override val title get() = R.string.paypal
|
||||
override val link get() = "https://paypal.me/$name"
|
||||
|
||||
object App : PayPal(), AppDev
|
||||
|
||||
object Main : PayPal() {
|
||||
object Project : PayPal() {
|
||||
override val name: String get() = "magiskdonate"
|
||||
}
|
||||
}
|
||||
@@ -68,19 +87,28 @@ sealed class IconLink : RvItem() {
|
||||
override val link get() = Const.Url.PATREON_URL
|
||||
}
|
||||
|
||||
sealed class Twitter : IconLink(), Dev {
|
||||
abstract class Twitter : IconLink(), Dev {
|
||||
override val icon get() = R.drawable.ic_twitter
|
||||
override val title get() = R.string.twitter
|
||||
override val link get() = "https://twitter.com/$name"
|
||||
|
||||
object App : Twitter(), AppDev
|
||||
|
||||
object Main : Twitter(), MainDev
|
||||
}
|
||||
|
||||
object Github : IconLink() {
|
||||
abstract class Github : IconLink() {
|
||||
override val icon get() = R.drawable.ic_github
|
||||
override val title get() = R.string.home_item_source
|
||||
override val link get() = Const.Url.SOURCE_CODE_URL
|
||||
override val title get() = R.string.github
|
||||
|
||||
abstract class User : Github(), Dev {
|
||||
override val link get() = "https://github.com/$name"
|
||||
}
|
||||
|
||||
object Project : Github() {
|
||||
override val link get() = Const.Url.SOURCE_CODE_URL
|
||||
}
|
||||
}
|
||||
|
||||
abstract class Sponsor : IconLink(), Dev {
|
||||
override val icon get() = R.drawable.ic_favorite
|
||||
override val title get() = R.string.github
|
||||
override val link get() = "https://github.com/sponsors/$name"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user