From 7746e63373c905faa6d7e45e45fffc48d3ffff85 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 3 Aug 2017 22:21:51 -0700 Subject: Add IM notifications, FAQ, video uploading, and geolocations (#107) * Test canary * Update activities to use kau base * Update dependencies * Cherry pick faq * Update kau and add faq * Add readme badges * Add im notifications and video uploading * Update theme * Update and fix unit tests * Add geolocation * Prepare alpha test * Remove explicit nonnull request --- app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt index 40e16f20..cc3ea52e 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt @@ -116,9 +116,14 @@ fun frostAnswers(action: Answers.() -> Unit) { Answers.getInstance().action() } -fun frostAnswersCustom(name: String, action: CustomEvent.() -> Unit = {}) { +fun frostAnswersCustom(name: String, vararg events: Pair) { frostAnswers { - logCustom(CustomEvent("Frost $name").apply { action() }) + logCustom(CustomEvent("Frost $name").apply { + events.forEach { (key, value) -> + if (value is Number) putCustomAttribute(key, value) + else putCustomAttribute(key, value.toString()) + } + }) } } -- cgit v1.2.3