mirror of
https://github.com/AllanWang/Frost-for-Facebook.git
synced 2024-11-08 20:12:39 +01:00
Update fast adapter
This commit is contained in:
parent
fb38a5d1ab
commit
0f2a571434
@ -108,13 +108,13 @@ class AboutActivity : AboutActivityBase(null) {
|
||||
isOpenSource = true,
|
||||
libraryDescription = string(R.string.frost_description),
|
||||
libraryVersion = BuildConfig.VERSION_NAME,
|
||||
license = License(
|
||||
licenses = setOf(License(
|
||||
definedName = "gplv3",
|
||||
licenseName = "GNU GPL v3",
|
||||
licenseWebsite = "https://www.gnu.org/licenses/gpl-3.0.en.html",
|
||||
licenseDescription = "",
|
||||
licenseShortDescription = ""
|
||||
)
|
||||
))
|
||||
)
|
||||
adapter.add(LibraryIItem(frost)).add(AboutLinks())
|
||||
adapter.onClickListener = { _, _, item, _ ->
|
||||
@ -149,7 +149,7 @@ class AboutActivity : AboutActivityBase(null) {
|
||||
override val type: Int
|
||||
get() = R.id.item_about_links
|
||||
|
||||
override fun bindView(holder: ViewHolder, payloads: MutableList<Any>) {
|
||||
override fun bindView(holder: ViewHolder, payloads: List<Any>) {
|
||||
super.bindView(holder, payloads)
|
||||
with(holder) {
|
||||
bindIconColor(*images.toTypedArray())
|
||||
|
@ -83,7 +83,7 @@ open class HeaderIItem(
|
||||
|
||||
val text: TextView by bindView(R.id.item_header_text)
|
||||
|
||||
override fun bindView(item: HeaderIItem, payloads: MutableList<Any>) {
|
||||
override fun bindView(item: HeaderIItem, payloads: List<Any>) {
|
||||
text.setTextColor(prefs.accentColor)
|
||||
text.text = item.text
|
||||
text.setBackgroundColor(prefs.nativeBgColor)
|
||||
@ -112,7 +112,7 @@ open class TextIItem(
|
||||
|
||||
val text: TextView by bindView(R.id.item_text_view)
|
||||
|
||||
override fun bindView(item: TextIItem, payloads: MutableList<Any>) {
|
||||
override fun bindView(item: TextIItem, payloads: List<Any>) {
|
||||
text.setTextColor(prefs.textColor)
|
||||
text.text = item.text
|
||||
text.background = createSimpleRippleDrawable(prefs.bgColor, prefs.nativeBgColor)
|
||||
|
@ -114,7 +114,7 @@ class NotificationIItem(val notification: FrostNotif, val cookie: String) :
|
||||
private val glide
|
||||
get() = GlideApp.with(itemView)
|
||||
|
||||
override fun bindView(item: NotificationIItem, payloads: MutableList<Any>) {
|
||||
override fun bindView(item: NotificationIItem, payloads: List<Any>) {
|
||||
val notif = item.notification
|
||||
frame.background = createSimpleRippleDrawable(
|
||||
prefs.textColor,
|
||||
|
@ -50,7 +50,7 @@ class TabIItem(val item: FbItem) : KauIItem<TabIItem.ViewHolder>(
|
||||
val image: ImageView by bindView(R.id.image)
|
||||
val text: TextView by bindView(R.id.text)
|
||||
|
||||
override fun bindView(item: TabIItem, payloads: MutableList<Any>) {
|
||||
override fun bindView(item: TabIItem, payloads: List<Any>) {
|
||||
val isInToolbar = adapterPosition < 4
|
||||
val color = if (isInToolbar) prefs.iconColor else prefs.textColor
|
||||
image.setIcon(item.item.icon, 20, color)
|
||||
|
@ -50,7 +50,7 @@ class AccountItem(val cookie: CookieEntity?) :
|
||||
|
||||
private val prefs: Prefs by inject()
|
||||
|
||||
override fun bindView(holder: ViewHolder, payloads: MutableList<Any>) {
|
||||
override fun bindView(holder: ViewHolder, payloads: List<Any>) {
|
||||
super.bindView(holder, payloads)
|
||||
with(holder) {
|
||||
text.invisible()
|
||||
|
@ -45,7 +45,7 @@ class KPrefTextSeekbar(builder: KPrefSeekbarContract) : KPrefSeekbar(builder) {
|
||||
}
|
||||
|
||||
@SuppressLint("MissingSuperCall")
|
||||
override fun bindView(holder: ViewHolder, payloads: MutableList<Any>) {
|
||||
override fun bindView(holder: ViewHolder, payloads: List<Any>) {
|
||||
super.bindView(holder, payloads)
|
||||
descOriginalSize = holder.desc?.textSize ?: 1f
|
||||
holder.desc?.layoutParams
|
||||
|
@ -104,7 +104,7 @@ class KeywordItem(val keyword: String) : AbstractItem<KeywordItem.ViewHolder>()
|
||||
override val type: Int
|
||||
get() = R.id.item_keyword
|
||||
|
||||
override fun bindView(holder: ViewHolder, payloads: MutableList<Any>) {
|
||||
override fun bindView(holder: ViewHolder, payloads: List<Any>) {
|
||||
super.bindView(holder, payloads)
|
||||
holder.text.text = keyword
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user