]> gitweb.stoutner.com Git - PrivacyCell.git/blobdiff - app/src/main/java/com/stoutner/privacycell/fragments/SettingsFragment.kt
Bump target API to 34. https://redmine.stoutner.com/issues/1104
[PrivacyCell.git] / app / src / main / java / com / stoutner / privacycell / fragments / SettingsFragment.kt
index dc8545ffb0abcfa96225bc19f86dcb6f29b250b9..911ab08e856c55040304edde0bdeb70a3ee515ee 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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>.
  *
@@ -56,7 +56,7 @@ class SettingsFragment : PreferenceFragmentCompat() {
     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
     }
@@ -140,7 +140,7 @@ class SettingsFragment : PreferenceFragmentCompat() {
 
         // 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.