aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/utils
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-29 21:48:27 -0700
committerAllan Wang <me@allanwang.ca>2017-06-29 21:48:27 -0700
commit86f789f8ec0d150098904b85dd6feb7a19725b1c (patch)
tree3cfcbdc78a96572ab5ef723de023b922a221cd54 /app/src/main/kotlin/com/pitchedapps/frost/utils
parent601b0492110f17e5f9a1a446897e0b42d4a8cffe (diff)
downloadfrost-86f789f8ec0d150098904b85dd6feb7a19725b1c.tar.gz
frost-86f789f8ec0d150098904b85dd6feb7a19725b1c.tar.bz2
frost-86f789f8ec0d150098904b85dd6feb7a19725b1c.zip
Lots of small incremental fixes
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Support.kt25
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Theme.kt4
3 files changed, 29 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
index 29593929..f73350f2 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
@@ -90,4 +90,6 @@ object Prefs : KPref() {
var previouslyPro: Boolean by kpref("previously_pro", false)
var debugPro: Boolean by kpref("debug_pro", false)
+
+ var searchBar :Boolean by kpref("search_bar", false)
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Support.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Support.kt
new file mode 100644
index 00000000..72df902c
--- /dev/null
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Support.kt
@@ -0,0 +1,25 @@
+package com.pitchedapps.frost.utils
+
+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
+
+/**
+ * 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)
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Theme.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Theme.kt
index 8e45848f..cb265149 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Theme.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Theme.kt
@@ -13,8 +13,8 @@ import com.pitchedapps.frost.injectors.JsActions
enum class Theme(@StringRes val textRes: Int, val injector: InjectorContract,
private val textColorGetter: () -> Int, private val backgroundColorGetter: () -> Int,
private val headerColorGetter: () -> Int, private val iconColorGetter: () -> Int) {
- DEFAULT(R.string.kau_default, JsActions.EMPTY, { 0xddffffff.toInt() }, { 0xfffafafa.toInt() }, { 0xff3b5998.toInt() }, { Color.WHITE }),
- LIGHT(R.string.kau_light, CssAssets.MATERIAL_LIGHT, { 0xddffffff.toInt() }, { 0xfffafafa.toInt() }, { 0xff3b5998.toInt() }, { Color.WHITE }),
+ DEFAULT(R.string.kau_default, JsActions.EMPTY, { 0xde000000.toInt() }, { 0xfffafafa.toInt() }, { 0xff3b5998.toInt() }, { Color.WHITE }),
+ LIGHT(R.string.kau_light, CssAssets.MATERIAL_LIGHT, { 0xde000000.toInt() }, { 0xfffafafa.toInt() }, { 0xff3b5998.toInt() }, { Color.WHITE }),
DARK(R.string.kau_dark, CssAssets.MATERIAL_DARK, { Color.WHITE }, { 0xff303030.toInt() }, { 0xff2e4b86.toInt() }, { Color.WHITE }),
AMOLED(R.string.kau_amoled, CssAssets.MATERIAL_AMOLED, { Color.WHITE }, { Color.BLACK }, { Color.BLACK }, { Color.WHITE }),
GLASS(R.string.kau_glass, CssAssets.MATERIAL_GLASS, { Color.WHITE }, { 0x80000000.toInt() }, { 0xb3000000.toInt() }, { Color.WHITE }),