@@ -41,6 +41,7 @@ class ConfigFragment : PreferenceFragmentCompat(), Preference.OnPreferenceChange
4141 private val host by lazy { findPreference<EditTextPreference >(" host" ) }
4242 private val path by lazy { findPreference<EditTextPreference >(" path" ) }
4343 private val certRaw by lazy { findPreference<EditTextPreference >(" certRaw" ) }
44+ private val loglevel by lazy { findPreference<ListPreference >(" loglevel" ) }
4445
4546 private fun readMode (value : String = mode.value) = when (value) {
4647 " websocket-http" -> Pair (null , null )
@@ -59,6 +60,7 @@ class ConfigFragment : PreferenceFragmentCompat(), Preference.OnPreferenceChange
5960 putWithDefault(" host" , host.text, " cloudfront.com" )
6061 putWithDefault(" path" , path.text, " /" )
6162 putWithDefault(" certRaw" , certRaw.text.replace(" \n " , " " ), " " )
63+ putWithDefault(" loglevel" , loglevel.value, " warning" )
6264 }
6365
6466 fun onInitializePluginOptions (options : PluginOptions ) {
@@ -70,6 +72,7 @@ class ConfigFragment : PreferenceFragmentCompat(), Preference.OnPreferenceChange
7072 host.text = options[" host" ] ? : " cloudfront.com"
7173 path.text = options[" path" ] ? : " /"
7274 certRaw.text = options[" certRaw" ]
75+ loglevel.value = options[" loglevel" ] ? : " warning"
7376 }
7477
7578 override fun onCreatePreferences (savedInstanceState : Bundle ? , rootKey : String? ) {
0 commit comments