aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/enums/Support.kt
blob: 85c8bc76033fbe4d0ad1b424982919d255de4cf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.pitchedapps.frost.enums

import android.content.Context
import android.support.annotation.StringRes
import ca.allanwang.kau.email.sendEmail
import ca.allanwang.kau.utils.string
import com.pitchedapps.frost.R
import com.pitchedapps.frost.utils.Prefs

/**
 * Created by Allan Wang on 2017-06-29.
 */
enum class Support(@StringRes val title: Int) {
    FEEDBACK(R.string.feedback),
    BUG(R.string.bug_report),
    THEME(R.string.theme_issue),
    FEATURE(R.string.feature_request);

    fun sendEmail(context: Context) {
        with(context) {
            this.sendEmail(string(R.string.dev_email), "${string(R.string.frost_prefix)} ${string(title)}") {
                addItem("Random Frost ID", Prefs.frostId)
            }
        }
    }
}