aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-16 15:25:24 -0700
committerAllan Wang <me@allanwang.ca>2017-06-16 15:25:24 -0700
commit7994cb1e927e61c07380a0eb7215e36120a1d6c0 (patch)
tree3adfb60b9c4775fe91f11c002b2f59dd69f0d0cb /app/src/main/kotlin
parent980fb3eecd6ae0c111e6e9c589ae4dee23df5567 (diff)
downloadfrost-7994cb1e927e61c07380a0eb7215e36120a1d6c0.tar.gz
frost-7994cb1e927e61c07380a0eb7215e36120a1d6c0.tar.bz2
frost-7994cb1e927e61c07380a0eb7215e36120a1d6c0.zip
Update travis
Diffstat (limited to 'app/src/main/kotlin')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt3
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/SettingsActivity.kt3
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt4
3 files changed, 5 insertions, 5 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
index c18c007a..6afc84fd 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
@@ -13,7 +13,6 @@ import com.mikepenz.materialdrawer.util.AbstractDrawerImageLoader
import com.mikepenz.materialdrawer.util.DrawerImageLoader
import com.mikepenz.materialdrawer.util.DrawerUIUtils
import com.pitchedapps.frost.facebook.FbCookie
-import com.pitchedapps.frost.services.requestNotifications
import com.pitchedapps.frost.utils.CrashReportingTree
import com.pitchedapps.frost.utils.Prefs
import com.raizlabs.android.dbflow.config.FlowConfig
@@ -45,7 +44,7 @@ class FrostApp : Application() {
Timber.plant(CrashReportingTree())
}
FlowManager.init(FlowConfig.Builder(this).build())
- Prefs.initialize(this, "${com.pitchedapps.frost.BuildConfig.APPLICATION_ID}.prefs")
+ Prefs.initialize(this, "${BuildConfig.APPLICATION_ID}.prefs")
FbCookie()
super.onCreate()
//Drawer profile loading logic
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/SettingsActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/SettingsActivity.kt
index 554a2771..998b551e 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/SettingsActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/SettingsActivity.kt
@@ -27,7 +27,7 @@ class SettingsActivity : KPrefActivity() {
if (item.pref != which) {
item.pref = which
reload()
- setFrostTheme()
+ setFrostTheme(true)
themeExterior()
}
true
@@ -99,6 +99,7 @@ class SettingsActivity : KPrefActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
themeExterior(false)
+ setFrostTheme(true)
}
fun themeExterior(animate: Boolean = true) {
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 0d99d67a..eb9f83d8 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
@@ -75,8 +75,8 @@ fun MaterialDialog.Builder.theme(): MaterialDialog.Builder {
return this
}
-fun Activity.setFrostTheme() {
- val isTransparent = Color.alpha(Prefs.bgColor) != 255
+fun Activity.setFrostTheme(forceTransparent: Boolean = false) {
+ val isTransparent = (Color.alpha(Prefs.bgColor) != 255) || forceTransparent
if (Prefs.bgColor.isColorDark())
setTheme(if (isTransparent) R.style.FrostTheme_Transparent else R.style.FrostTheme)
else