From 50a7b483b9169ed435839ffc6c4b1953e2d034e5 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Wed, 21 Jun 2017 00:17:11 -0700 Subject: Clean up and add event logging --- app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt | 7 +++++++ 1 file changed, 7 insertions(+) (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 3e0e6924..b9de13af 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt @@ -16,6 +16,7 @@ import android.widget.TextView import ca.allanwang.kau.utils.* import com.afollestad.materialdialogs.MaterialDialog import com.crashlytics.android.answers.Answers +import com.crashlytics.android.answers.CustomEvent import com.pitchedapps.frost.* import com.pitchedapps.frost.dbflow.CookieModel import com.pitchedapps.frost.facebook.FB_URL_BASE @@ -141,4 +142,10 @@ fun frostAnswers(action: Answers.() -> Unit) { if (BuildConfig.DEBUG) return //TODO add opt out toggle Answers.getInstance().action() +} + +fun frostAnswersCustom(name: String, action: CustomEvent.() -> Unit = {}) { + frostAnswers { + logCustom(CustomEvent("Frost $name").apply { action() }) + } } \ No newline at end of file -- cgit v1.2.3