aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt5
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt21
2 files changed, 15 insertions, 11 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..b8a71fa1 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) {
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt
index 817eebe1..02b7fb9d 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt
@@ -28,6 +28,7 @@ import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter
import androidx.viewpager.widget.ViewPager
import ca.allanwang.kau.internal.KauBaseActivity
+import ca.allanwang.kau.kotlin.lazyUi
import ca.allanwang.kau.utils.blendWith
import ca.allanwang.kau.utils.color
import ca.allanwang.kau.utils.fadeScaleTransition
@@ -82,14 +83,16 @@ class IntroActivity :
lateinit var binding: ActivityIntroBinding
private var barHasNext = true
- val fragments = listOf(
- IntroFragmentWelcome(),
- IntroFragmentTheme(),
- IntroAccountFragment(),
- IntroTabTouchFragment(),
- IntroTabContextFragment(),
- IntroFragmentEnd()
- )
+ private val fragments by lazyUi {
+ listOf(
+ IntroFragmentWelcome(),
+ IntroFragmentTheme(),
+ IntroAccountFragment(),
+ IntroTabTouchFragment(),
+ IntroTabContextFragment(),
+ IntroFragmentEnd()
+ )
+ }
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@@ -130,7 +133,7 @@ class IntroActivity :
/**
* Transformations are mainly handled on a per view basis
- * This sifies it by making the first fragment fade out as the second fragment comes in
+ * This makes the first fragment fade out as the second fragment comes in
* All fragments are locked in position
*/
override fun transformPage(page: View, position: Float) {