aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2020-02-29 23:34:58 -0800
committerGitHub <noreply@github.com>2020-02-29 23:34:58 -0800
commite732e30d97babca49ba5f7d97aea1620ba14024b (patch)
tree3101fb9e17eede3ffbf75e96358c6ac0a330aaf7 /app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt
parente893c5ab9a976031c15e792583b411f6c9a429e5 (diff)
parent551dbbcf1a56c33c378d6edfc3a3615311867001 (diff)
downloadfrost-e732e30d97babca49ba5f7d97aea1620ba14024b.tar.gz
frost-e732e30d97babca49ba5f7d97aea1620ba14024b.tar.bz2
frost-e732e30d97babca49ba5f7d97aea1620ba14024b.zip
Merge pull request #1657 from AllanWang/versions
Update versions
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt11
1 files changed, 6 insertions, 5 deletions
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 1262c078..5257be5e 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt
@@ -44,20 +44,20 @@ interface ClickableIItemContract {
val url: String?
- fun click(context: Context, fbCookie: FbCookie) {
+ fun click(context: Context, fbCookie: FbCookie, prefs: Prefs) {
val url = url ?: return
- context.launchWebOverlay(url, fbCookie)
+ context.launchWebOverlay(url, fbCookie, prefs)
}
companion object {
- fun bindEvents(adapter: IAdapter<GenericItem>, fbCookie: FbCookie) {
+ fun bindEvents(adapter: IAdapter<GenericItem>, fbCookie: FbCookie, prefs: Prefs) {
adapter.fastAdapter?.apply {
selectExtension {
isSelectable = false
}
onClickListener = { v, _, item, _ ->
if (item is ClickableIItemContract) {
- item.click(v!!.context, fbCookie)
+ item.click(v!!.context, fbCookie, prefs)
true
} else
false
@@ -76,7 +76,8 @@ open class HeaderIItem(
itemId: Int = R.layout.iitem_header
) : KauIItem<HeaderIItem.ViewHolder>(R.layout.iitem_header, ::ViewHolder, itemId) {
- class ViewHolder(itemView: View) : FastAdapter.ViewHolder<HeaderIItem>(itemView), KoinComponent {
+ class ViewHolder(itemView: View) : FastAdapter.ViewHolder<HeaderIItem>(itemView),
+ KoinComponent {
private val prefs: Prefs by inject()