diff options
author | Allan Wang <me@allanwang.ca> | 2018-11-06 22:35:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-06 22:35:58 -0500 |
commit | da63f00eb50a8c413ee55652eff8a4fcc5f83e5a (patch) | |
tree | 33b2eb5da6963ba267877ae836ecba0dcef344ca /app/src/main/kotlin/com/pitchedapps/frost/iitems | |
parent | bffa6474f36b990c1de0eaeb8df2cf80d094d3fa (diff) | |
download | frost-da63f00eb50a8c413ee55652eff8a4fcc5f83e5a.tar.gz frost-da63f00eb50a8c413ee55652eff8a4fcc5f83e5a.tar.bz2 frost-da63f00eb50a8c413ee55652eff8a4fcc5f83e5a.zip |
Fix/duplicate back (#1177)
* Merge potential fix for text zoom
* Actually fix the duplicate back
* Prepare fixing dependent notifications
* Add notification fallback url
* Add back acontext to url, fixes #1137
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/iitems')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt | 5 |
1 files changed, 4 insertions, 1 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 61e8b6c4..06bc0604 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/iitems/NotificationIItem.kt @@ -14,11 +14,13 @@ import com.mikepenz.fastadapter.FastAdapter import com.mikepenz.fastadapter.adapters.ItemAdapter import com.mikepenz.fastadapter.commons.utils.DiffCallback import com.pitchedapps.frost.R +import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.facebook.parsers.FrostNotif import com.pitchedapps.frost.glide.FrostGlide import com.pitchedapps.frost.glide.GlideApp import com.pitchedapps.frost.services.FrostRunnable import com.pitchedapps.frost.utils.Prefs +import com.pitchedapps.frost.utils.isIndependent import com.pitchedapps.frost.utils.launchWebOverlay /** @@ -37,7 +39,8 @@ class NotificationIItem(val notification: FrostNotif, val cookie: String) : KauI FrostRunnable.markNotificationRead(v!!.context, notif.id, item.cookie) adapter.set(position, NotificationIItem(notif.copy(unread = false), item.cookie)) } - v!!.context.launchWebOverlay(notif.url) + // 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) true } } |