diff options
author | Allan Wang <me@allanwang.ca> | 2017-06-21 00:17:11 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-06-21 00:17:11 -0700 |
commit | 50a7b483b9169ed435839ffc6c4b1953e2d034e5 (patch) | |
tree | 4219f4c55afe4dfb58c20b0c4f049536616328da /app/src/main/kotlin/com/pitchedapps/frost/services | |
parent | 1b74d78f836ca30ef78a779da75f6acb592277a4 (diff) | |
download | frost-50a7b483b9169ed435839ffc6c4b1953e2d034e5.tar.gz frost-50a7b483b9169ed435839ffc6c4b1953e2d034e5.tar.bz2 frost-50a7b483b9169ed435839ffc6c4b1953e2d034e5.zip |
Clean up and add event logging
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/services')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/services/NotificationService.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationService.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationService.kt index 9c8bf2e6..03dd21a4 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationService.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationService.kt @@ -18,6 +18,7 @@ import com.pitchedapps.frost.facebook.FACEBOOK_COM import com.pitchedapps.frost.facebook.FB_URL_BASE import com.pitchedapps.frost.facebook.FbTab import com.pitchedapps.frost.utils.L +import com.pitchedapps.frost.utils.frostAnswersCustom import com.pitchedapps.frost.utils.frostNotification import org.jetbrains.anko.doAsync import org.jsoup.Jsoup @@ -39,7 +40,7 @@ class NotificationService : JobService() { override fun onStartJob(params: JobParameters?): Boolean { future = doAsync { - debugNotification("Load notifs") + // debugNotification("Load notifs") loadFbCookiesSync().forEach { data -> L.i("Handle notifications for $data") @@ -59,6 +60,7 @@ class NotificationService : JobService() { } } if (notifCount > 0) saveNotificationTime(NotificationModel(data.id, latestEpoch)) + frostAnswersCustom("Notifications") { putCustomAttribute("Count", notifCount) } summaryNotification(data.id, notifCount) } L.d("Finished notifications") @@ -69,7 +71,6 @@ class NotificationService : JobService() { } companion object { - const val ARG_ID = "arg_id" val epochMatcher: Regex by lazy { Regex(":([0-9]*),") } val notifIdMatcher: Regex by lazy { Regex("notif_id\":([0-9]*),") } } |