aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-11-06 22:35:58 -0500
committerGitHub <noreply@github.com>2018-11-06 22:35:58 -0500
commitda63f00eb50a8c413ee55652eff8a4fcc5f83e5a (patch)
tree33b2eb5da6963ba267877ae836ecba0dcef344ca /app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
parentbffa6474f36b990c1de0eaeb8df2cf80d094d3fa (diff)
downloadfrost-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/services/FrostNotifications.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
index 2bb1b5c5..295dbe0c 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
@@ -26,10 +26,7 @@ import com.pitchedapps.frost.facebook.parsers.NotifParser
import com.pitchedapps.frost.facebook.parsers.ParseNotification
import com.pitchedapps.frost.glide.FrostGlide
import com.pitchedapps.frost.glide.GlideApp
-import com.pitchedapps.frost.utils.ARG_USER_ID
-import com.pitchedapps.frost.utils.L
-import com.pitchedapps.frost.utils.Prefs
-import com.pitchedapps.frost.utils.frostEvent
+import com.pitchedapps.frost.utils.*
import java.util.*
/**
@@ -152,7 +149,8 @@ enum class NotificationType(
private fun createNotification(context: Context, content: NotificationContent): FrostNotification =
with(content) {
val intent = Intent(context, FrostWebActivity::class.java)
- intent.data = Uri.parse(href)
+ // TODO temp fix; we will show notification page for dependent urls. We can trigger a click next time
+ intent.data = Uri.parse(if (href.isIndependent) href else FbItem.NOTIFICATIONS.url)
intent.putExtra(ARG_USER_ID, data.id)
overlayContext.put(intent)
bindRequest(intent, content, data.cookie)