/*
- * Copyright 2021-2022 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2021-2023 Soren Stoutner <soren@stoutner.com>.
*
* This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
*
private lateinit var bottomAppBarPreference: Preference
companion object {
- // Declare the private static class variables. Otherwise, onRestart will not pull the same values that are populated from the saved instance state.
+ // Declare the private static class variables. For some reason (I'm looking at you Android's Activity Lifecycle) this only works if these are static.
private var fragmentRestarted: Boolean = false
private var scrollY: Int = 0
}
// Check if the fragment has been restarted.
if (savedInstanceState != null) {
- // Set the fragment restored flag.
+ // Set the fragment restarted flag.
fragmentRestarted = true
// Save the scroll Y.