From 0f2a57143438de0d86485c0eddd0e766ad2fcee5 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 18 Jul 2020 18:08:31 -0700 Subject: [PATCH] Update fast adapter --- .../com/pitchedapps/frost/activities/AboutActivity.kt | 6 +++--- .../kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt | 4 ++-- .../com/pitchedapps/frost/iitems/NotificationIItem.kt | 2 +- .../main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt | 2 +- .../main/kotlin/com/pitchedapps/frost/views/AccountItem.kt | 2 +- .../kotlin/com/pitchedapps/frost/views/KPrefTextSeekbar.kt | 2 +- app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt index 04c0334d2..af5ba755d 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt @@ -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) { + override fun bindView(holder: ViewHolder, payloads: List) { super.bindView(holder, payloads) with(holder) { bindIconColor(*images.toTypedArray()) diff --git a/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt b/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt index 5257be5e9..746f0c1ce 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt @@ -83,7 +83,7 @@ open class HeaderIItem( val text: TextView by bindView(R.id.item_header_text) - override fun bindView(item: HeaderIItem, payloads: MutableList) { + override fun bindView(item: HeaderIItem, payloads: List) { 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) { + override fun bindView(item: TextIItem, payloads: List) { text.setTextColor(prefs.textColor) text.text = item.text text.background = createSimpleRippleDrawable(prefs.bgColor, prefs.nativeBgColor) diff --git a/app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt index 3150ce6d2..ab8e7afd8 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt @@ -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) { + override fun bindView(item: NotificationIItem, payloads: List) { val notif = item.notification frame.background = createSimpleRippleDrawable( prefs.textColor, diff --git a/app/src/main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt index c1998c04f..fcd710315 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt @@ -50,7 +50,7 @@ class TabIItem(val item: FbItem) : KauIItem( val image: ImageView by bindView(R.id.image) val text: TextView by bindView(R.id.text) - override fun bindView(item: TabIItem, payloads: MutableList) { + override fun bindView(item: TabIItem, payloads: List) { val isInToolbar = adapterPosition < 4 val color = if (isInToolbar) prefs.iconColor else prefs.textColor image.setIcon(item.item.icon, 20, color) diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt index 374488fdd..aab7189cc 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt @@ -50,7 +50,7 @@ class AccountItem(val cookie: CookieEntity?) : private val prefs: Prefs by inject() - override fun bindView(holder: ViewHolder, payloads: MutableList) { + override fun bindView(holder: ViewHolder, payloads: List) { super.bindView(holder, payloads) with(holder) { text.invisible() diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/KPrefTextSeekbar.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/KPrefTextSeekbar.kt index 1a287c465..e018b6d8e 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/KPrefTextSeekbar.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/KPrefTextSeekbar.kt @@ -45,7 +45,7 @@ class KPrefTextSeekbar(builder: KPrefSeekbarContract) : KPrefSeekbar(builder) { } @SuppressLint("MissingSuperCall") - override fun bindView(holder: ViewHolder, payloads: MutableList) { + override fun bindView(holder: ViewHolder, payloads: List) { super.bindView(holder, payloads) descOriginalSize = holder.desc?.textSize ?: 1f holder.desc?.layoutParams diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt index f2386e815..e96e20608 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt @@ -104,7 +104,7 @@ class KeywordItem(val keyword: String) : AbstractItem() override val type: Int get() = R.id.item_keyword - override fun bindView(holder: ViewHolder, payloads: MutableList) { + override fun bindView(holder: ViewHolder, payloads: List) { super.bindView(holder, payloads) holder.text.text = keyword }