aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-09-13 20:57:56 -0700
committerAllan Wang <me@allanwang.ca>2021-09-13 20:57:56 -0700
commit47fcc3a2947be85a57086f7621ef1bdfcbd8a404 (patch)
treed9b4ef4daa9b28f26a8bf440be4ce997ad761192 /app/src/main
parent2cea05c08619984947f2d997a0677459a7c42acf (diff)
downloadfrost-47fcc3a2947be85a57086f7621ef1bdfcbd8a404.tar.gz
frost-47fcc3a2947be85a57086f7621ef1bdfcbd8a404.tar.bz2
frost-47fcc3a2947be85a57086f7621ef1bdfcbd8a404.zip
Create initial hilt tests
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt15
1 files changed, 8 insertions, 7 deletions
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 c5b8bdaa..e3b607a3 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt
@@ -137,8 +137,9 @@ class ImageActivity : KauBaseActivity() {
lateinit var binding: ActivityImageBinding
private var bottomBehavior: BottomSheetBehavior<View>? = null
- private val baseBackgroundColor = if (prefs.blackMediaBg) Color.BLACK
- else themeProvider.bgColor.withMinAlpha(235)
+ private val baseBackgroundColor: Int
+ get() = if (prefs.blackMediaBg) Color.BLACK
+ else themeProvider.bgColor.withMinAlpha(235)
private fun loadError(e: Throwable) {
if (e.message?.contains("<!DOCTYPE html>") == true) {
@@ -226,11 +227,11 @@ class ImageActivity : KauBaseActivity() {
setState(FabStates.SHARE)
}
imagePhoto.setOnImageEventListener(object :
- SubsamplingScaleImageView.DefaultOnImageEventListener() {
- override fun onImageLoadError(e: Exception) {
- loadError(e)
- }
- })
+ SubsamplingScaleImageView.DefaultOnImageEventListener() {
+ override fun onImageLoadError(e: Exception) {
+ loadError(e)
+ }
+ })
activityThemer.setFrostColors {
themeWindow = false
}