Skip to content

Commit

Permalink
Avoid animation of server settings
Browse files Browse the repository at this point in the history
Populate server prefs earlier, so they don't get animated when opening settings.

Signed-off-by: mueller-ma <[email protected]>
  • Loading branch information
mueller-ma committed Jun 28, 2024
1 parent 2379297 commit ece337f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ class MainSettingsFragment : AbstractSettingsFragment(), ConnectionFactory.Updat

override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
addPreferencesFromResource(R.xml.preferences)
// Populate server prefs here, so they don't get animated.
// Do it in onStart() again to update the list, e.g. after adding new servers.
populateServerPrefs()

val addServerPref = getPreference("add_server")
val sendDeviceInfoPref = getPreference(PrefKeys.SUBSCREEN_SEND_DEVICE_INFO)
Expand Down

0 comments on commit ece337f

Please sign in to comment.