diff options
author | Allan Wang <me@allanwang.ca> | 2020-02-23 16:36:31 -0800 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2020-02-23 16:36:31 -0800 |
commit | 0dfc1b3e6542b9deca6c56236b46e71e4c6976f5 (patch) | |
tree | d16e4c34b86b0cc236fce32baa38d71f3b7adfbf /app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt | |
parent | cd69ccf7c49f486a6c90a7cee0d32a74ea00247d (diff) | |
download | frost-0dfc1b3e6542b9deca6c56236b46e71e4c6976f5.tar.gz frost-0dfc1b3e6542b9deca6c56236b46e71e4c6976f5.tar.bz2 frost-0dfc1b3e6542b9deca6c56236b46e71e4c6976f5.zip |
Remove singleton pattern for fbcookie
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt | 5 |
1 files changed, 3 insertions, 2 deletions
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 828d2484..8624fff0 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt @@ -31,6 +31,7 @@ import com.mikepenz.fastadapter.adapters.ItemAdapter import com.mikepenz.fastadapter.diff.DiffCallback import com.mikepenz.fastadapter.select.selectExtension import com.pitchedapps.frost.R +import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.facebook.parsers.FrostNotif import com.pitchedapps.frost.glide.FrostGlide @@ -50,7 +51,7 @@ class NotificationIItem(val notification: FrostNotif, val cookie: String) : ) { companion object { - fun bindEvents(adapter: ItemAdapter<NotificationIItem>) { + fun bindEvents(adapter: ItemAdapter<NotificationIItem>, fbCookie: FbCookie) { adapter.fastAdapter?.apply { selectExtension { isSelectable = false @@ -64,7 +65,7 @@ class NotificationIItem(val notification: FrostNotif, val cookie: String) : ) } // TODO temp fix. If url is dependent, we cannot load it directly - v!!.context.launchWebOverlay(if (notif.url.isIndependent) notif.url else FbItem.NOTIFICATIONS.url) + v!!.context.launchWebOverlay(if (notif.url.isIndependent) notif.url else FbItem.NOTIFICATIONS.url, fbCookie) true } } |