Skip to content

Commit

Permalink
Removed update on start setting
Browse files Browse the repository at this point in the history
  • Loading branch information
CookieJarApps committed Apr 18, 2021
1 parent 7adb1ef commit 1848cd2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
true
}
}

val updateOnStart: SwitchPreference? =
findPreference(UPDATE_ON_START)

updateOnStart?.let {
it.isChecked = sharedPrefs.getBoolean(UPDATE_ON_START, true)
it.onPreferenceChangeListener = Preference.OnPreferenceChangeListener{ _, value ->
sharedPrefs.edit().putBoolean(UPDATE_ON_START, value as Boolean).apply()
true
}
}
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
Expand Down Expand Up @@ -112,6 +101,5 @@ class SettingsFragment : PreferenceFragmentCompat() {
companion object {
private const val OPEN_DIRECTORY_REQUEST_CODE = 42070
private const val DOWNLOAD_LOCATION = "download"
private const val UPDATE_ON_START = "update_on_start"
}
}
7 changes: 0 additions & 7 deletions app/src/main/res/xml/preference_headers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,4 @@
android:icon="@drawable/ic_download"
app:iconSpaceReserved="true" />

<SwitchPreference
android:key="update_on_start"
android:title="@string/update_on_start"
android:icon="@drawable/ic_update"
android:defaultValue="true"
app:iconSpaceReserved="true" />

</PreferenceScreen>

0 comments on commit 1848cd2

Please sign in to comment.