aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/build.gradle16
-rw-r--r--app/src/main/AndroidManifest.xml2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt26
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt2
-rw-r--r--app/src/main/res/values/styles.xml10
-rw-r--r--gradle.properties2
6 files changed, 30 insertions, 28 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 2348e053..a95457dd 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -189,21 +189,21 @@ dependencies {
implementation kau.Dependencies.kotlin
//noinspection GradleDependency
- implementation "ca.allanwang.kau:adapter:${KAU}"
+ implementation kau.Dependencies.kau('core', KAU)
//noinspection GradleDependency
- implementation "ca.allanwang.kau:about:${KAU}"
+ implementation kau.Dependencies.kau('core-ui', KAU)
//noinspection GradleDependency
- implementation "ca.allanwang.kau:colorpicker:${KAU}"
+ implementation kau.Dependencies.kau('adapter', KAU)
//noinspection GradleDependency
- implementation "ca.allanwang.kau:mediapicker:${KAU}"
+ implementation kau.Dependencies.kau('about', KAU)
//noinspection GradleDependency
- implementation "ca.allanwang.kau:kpref-activity:${KAU}"
+ implementation kau.Dependencies.kau('colorpicker', KAU)
//noinspection GradleDependency
- implementation "ca.allanwang.kau:searchview:${KAU}"
+ implementation kau.Dependencies.kau('mediapicker', KAU)
//noinspection GradleDependency
- implementation "ca.allanwang.kau:core:${KAU}"
+ implementation kau.Dependencies.kau('kpref-activity', KAU)
//noinspection GradleDependency
- implementation "ca.allanwang.kau:core-ui:${KAU}"
+ implementation kau.Dependencies.kau('searchview', KAU)
implementation "androidx.core:core-ktx:${Versions.ktx}"
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index bd8776d1..e4fc0415 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -147,7 +147,7 @@
android:theme="@style/Kau.About" />
<activity
android:name=".activities.ImageActivity"
- android:theme="@style/FrostTheme.Transparent" />
+ android:theme="@style/FrostTheme.Overlay" />
<activity android:name=".activities.DebugActivity" />
<service
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt
index cf8acdd3..8aebb575 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt
@@ -16,7 +16,6 @@
*/
package com.pitchedapps.frost
-import android.content.Intent
import android.graphics.Color
import android.os.Build
import android.os.Bundle
@@ -26,11 +25,9 @@ import android.widget.TextView
import ca.allanwang.kau.internal.KauBaseActivity
import ca.allanwang.kau.utils.buildIsLollipopAndUp
import ca.allanwang.kau.utils.setIcon
-import ca.allanwang.kau.utils.startActivity
import ca.allanwang.kau.utils.string
import com.mikepenz.google_material_typeface_library.GoogleMaterial
import com.pitchedapps.frost.activities.LoginActivity
-import com.pitchedapps.frost.activities.MainActivity
import com.pitchedapps.frost.activities.SelectorActivity
import com.pitchedapps.frost.db.CookieDao
import com.pitchedapps.frost.db.CookieEntity
@@ -43,9 +40,9 @@ import com.pitchedapps.frost.db.saveTabs
import com.pitchedapps.frost.db.selectAll
import com.pitchedapps.frost.facebook.FbCookie
import com.pitchedapps.frost.utils.BiometricUtils
-import com.pitchedapps.frost.utils.EXTRA_COOKIES
import com.pitchedapps.frost.utils.L
import com.pitchedapps.frost.utils.Prefs
+import com.pitchedapps.frost.utils.launchImageActivity
import com.pitchedapps.frost.utils.launchNewTask
import com.pitchedapps.frost.utils.loadAssets
import com.raizlabs.android.dbflow.kotlinextensions.from
@@ -86,18 +83,24 @@ class StartActivity : KauBaseActivity() {
FbCookie.switchBackUser()
val cookies = ArrayList(cookieDao.selectAll())
L.i { "Cookies loaded at time ${System.currentTimeMillis()}" }
- L._d { "Cookies: ${cookies.joinToString("\t", transform = CookieEntity::toSensitiveString)}" }
+ L._d {
+ "Cookies: ${cookies.joinToString(
+ "\t",
+ transform = CookieEntity::toSensitiveString
+ )}"
+ }
loadAssets()
authDefer.await()
when {
cookies.isEmpty() -> launchNewTask<LoginActivity>()
// Has cookies but no selected account
Prefs.userId == -1L -> launchNewTask<SelectorActivity>(cookies)
- else -> startActivity<MainActivity>(intentBuilder = {
- putParcelableArrayListExtra(EXTRA_COOKIES, cookies)
- flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP or
- Intent.FLAG_ACTIVITY_SINGLE_TOP
- })
+ else -> launchImageActivity("https://images.pexels.com/photos/374870/pexels-photo-374870.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500")
+// else -> startActivity<MainActivity>(intentBuilder = {
+// putParcelableArrayListExtra(EXTRA_COOKIES, cookies)
+// flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP or
+// Intent.FLAG_ACTIVITY_SINGLE_TOP
+// })
}
} catch (e: Exception) {
L._e(e) { "Load start failed" }
@@ -112,7 +115,8 @@ class StartActivity : KauBaseActivity() {
*/
private suspend fun migrate() = withContext(Dispatchers.IO) {
if (cookieDao.selectAll().isNotEmpty()) return@withContext
- val cookies = (select from CookieModel::class).queryList().map { CookieEntity(it.id, it.name, it.cookie) }
+ val cookies = (select from CookieModel::class).queryList()
+ .map { CookieEntity(it.id, it.name, it.cookie) }
if (cookies.isNotEmpty()) {
cookieDao.save(cookies)
L._d { "Migrated cookies ${cookieDao.selectAll()}" }
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt
index 814ce778..661b4526 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt
@@ -162,7 +162,7 @@ class ImageActivity : KauBaseActivity() {
setContentView(layout)
image_container.setBackgroundColor(
if (Prefs.blackMediaBg) Color.BLACK
- else Prefs.bgColor.withMinAlpha(222)
+ else Prefs.bgColor.withMinAlpha(235)
)
image_text?.setTextColor(if (Prefs.blackMediaBg) Color.WHITE else Prefs.textColor)
image_text?.setBackgroundColor(
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 7816533b..33f36174 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -38,6 +38,9 @@
</style>
<style name="FrostTheme.Overlay">
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:backgroundDimEnabled">false</item>
+ <item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
</style>
@@ -49,12 +52,7 @@
<item name="android:windowAnimationStyle">@style/KauFadeInFadeOut</item>
</style>
- <style name="FrostTheme.Video" parent="FrostTheme.Overlay.Fade">
- <item name="android:windowBackground">@android:color/transparent</item>
- <item name="android:backgroundDimEnabled">false</item>
- <item name="android:colorBackgroundCacheHint">@null</item>
- <item name="android:windowIsTranslucent">true</item>
- </style>
+ <style name="FrostTheme.Video" parent="FrostTheme.Overlay.Fade" />
<style name="FrostTheme.Settings" parent="FrostTheme">
<item name="android:windowAnimationStyle">@style/KauSlideInFadeOut</item>
diff --git a/gradle.properties b/gradle.properties
index 83b2027b..ea3a684a 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -16,7 +16,7 @@ org.gradle.daemon = true
APP_ID=Frost
APP_GROUP=com.pitchedapps
-KAU=5.0.0
+KAU=d91d734
android.useAndroidX=true
android.enableJetifier=true