aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-08-19 00:50:59 -0700
committerGitHub <noreply@github.com>2017-08-19 00:50:59 -0700
commit1538c192b57153e50db524f2f8b0ad3656209344 (patch)
tree0fb0f83af4862a127bca7d8451ef2c7188a08d83
parentf5394badad02671dc0de181ab63b9a9bfbe9fd59 (diff)
downloadfrost-1538c192b57153e50db524f2f8b0ad3656209344.tar.gz
frost-1538c192b57153e50db524f2f8b0ad3656209344.tar.bz2
frost-1538c192b57153e50db524f2f8b0ad3656209344.zip
Enhancement/media-camera-picker (#194)
* Update kau * Update changelog
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/MediaPickerActivity.kt6
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt7
-rw-r--r--app/src/main/res/xml/frost_changelog.xml2
-rw-r--r--gradle.properties2
4 files changed, 10 insertions, 7 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/MediaPickerActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/MediaPickerActivity.kt
index d42b5d9f..162baf20 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/activities/MediaPickerActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/MediaPickerActivity.kt
@@ -1,12 +1,10 @@
package com.pitchedapps.frost.activities
import android.content.Context
-import android.graphics.Color
import android.net.Uri
import android.support.v4.content.FileProvider
import ca.allanwang.kau.mediapicker.*
import ca.allanwang.kau.utils.colorToBackground
-import ca.allanwang.kau.utils.isColorVisibleOn
import com.pitchedapps.frost.BuildConfig
import com.pitchedapps.frost.utils.Prefs
import java.io.File
@@ -15,9 +13,7 @@ import java.io.File
* Created by Allan Wang on 2017-07-23.
*/
private fun actions(): List<MediaAction> {
- var color = Prefs.iconBackgroundColor
- if (!color.isColorVisibleOn(Color.WHITE, 50))
- color = 0xff3b5998.toInt()
+ val color = Prefs.accentColorForWhite
return listOf(object : MediaActionCamera(color) {
override fun createFile(context: Context): File
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 27405026..34257da8 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
@@ -1,10 +1,10 @@
package com.pitchedapps.frost.utils
+import android.graphics.Color
import ca.allanwang.kau.kotlin.lazyResettable
import ca.allanwang.kau.kpref.KPref
import ca.allanwang.kau.kpref.StringSet
import ca.allanwang.kau.kpref.kpref
-import ca.allanwang.kau.utils.colorToForeground
import ca.allanwang.kau.utils.isColorVisibleOn
import com.pitchedapps.frost.facebook.FeedSort
import com.pitchedapps.frost.injectors.InjectorContract
@@ -54,6 +54,11 @@ object Prefs : KPref() {
val accentColor: Int
get() = t.accentColor
+ val accentColorForWhite: Int
+ get() = if (accentColor.isColorVisibleOn(Color.WHITE)) accentColor
+ else if (textColor.isColorVisibleOn(Color.WHITE)) textColor
+ else FACEBOOK_BLUE
+
val bgColor: Int
get() = t.bgColor
diff --git a/app/src/main/res/xml/frost_changelog.xml b/app/src/main/res/xml/frost_changelog.xml
index 43efb8c5..e1db7e36 100644
--- a/app/src/main/res/xml/frost_changelog.xml
+++ b/app/src/main/res/xml/frost_changelog.xml
@@ -17,6 +17,8 @@
<item text="Add option to get image/video from default camera or gallery app." />
<item text="Fix some bug reports." />
<item text="Remove error dialog for IAB. It will now depend solely on the google services dialogs." />
+ <item text="Fix loading issue for old conversations" />
+ <item text="Add debugger for failed image activities" />
<item text="" />
<item text="" />
diff --git a/gradle.properties b/gradle.properties
index 9644338e..3bda4823 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -17,7 +17,7 @@ MIN_SDK=21
TARGET_SDK=26
BUILD_TOOLS=26.0.1
-KAU=caab9d5
+KAU=20f9648
KOTLIN=1.1.4
COMMONS_TEXT=1.1