Commit ec0c1aca authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Added function with fixed type Preference (findPreference is now typed)

parent 055250b3
Pipeline #4781 passed with stage
in 6 minutes and 7 seconds
......@@ -14,6 +14,7 @@ import androidx.appcompat.app.AlertDialog
import androidx.core.content.FileProvider
import androidx.preference.CheckBoxPreference
import androidx.preference.EditTextPreference
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import com.frostnerd.design.dialogs.LoadingDialog
import com.frostnerd.general.isInt
......@@ -93,6 +94,10 @@ class SettingsFragment : PreferenceFragmentCompat() {
)
}
fun findPreference(key:String): Preference {
return super.findPreference<Preference>(key)!!
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
log("Fragment created")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment