aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-10-07 01:00:24 -0400
committerGitHub <noreply@github.com>2017-10-07 01:00:24 -0400
commit60cc50d8f6785d33adf4dafd456c836c96a9e3de (patch)
treea887c1dc931f0c434e912c9209c8fa91c2d003e9 /app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
parent5382d8222915727a47c36f0e7ac280c701dbfcdf (diff)
downloadfrost-60cc50d8f6785d33adf4dafd456c836c96a9e3de.tar.gz
frost-60cc50d8f6785d33adf4dafd456c836c96a9e3de.tar.bz2
frost-60cc50d8f6785d33adf4dafd456c836c96a9e3de.zip
Enhancement/message parsing (#369)
* Test custom regex * Remove statics, use lists, and add amp (#366) * Remove statics, use lists, and add amp * Remove another jvmstatic * Update parser for messages * Update dependencies * Update travis * Use parsing for background im fetcher * Update changelog * Update changelog
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.kt6
1 files changed, 5 insertions, 1 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 b892af91..b1f26d99 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt
@@ -24,6 +24,7 @@ import com.pitchedapps.frost.dbflow.CookieModel
import com.pitchedapps.frost.enums.OverlayContext
import com.pitchedapps.frost.facebook.FbItem
import com.pitchedapps.frost.facebook.formattedFbUrl
+import com.pitchedapps.frost.parsers.FrostThread
import com.pitchedapps.frost.utils.*
import org.jetbrains.anko.runOnUiThread
@@ -159,7 +160,10 @@ data class NotificationContent(val data: CookieModel,
val title: String? = null,
val text: String,
val timestamp: Long,
- val profileUrl: String)
+ val profileUrl: String) {
+ constructor(data:CookieModel, thread: FrostThread)
+ :this(data, thread.id, thread.url, thread.title, thread.content ?: "", thread.time, thread.img)
+}
const val NOTIFICATION_PERIODIC_JOB = 7