mirror of
https://github.com/lizongying/my-tv.git
synced 2026-11-11 05:56:30 +08:00
feat: 新增开机自启配置项,默认启用
This commit is contained in:
@@ -11,6 +11,7 @@ import com.lizongying.mytv.databinding.DialogBinding
|
||||
class SettingFragment(private val versionName: String,
|
||||
private val channelReversal: Boolean,
|
||||
private val channelNum: Boolean,
|
||||
private val bootStartup: Boolean,
|
||||
) :
|
||||
DialogFragment() {
|
||||
|
||||
@@ -43,6 +44,12 @@ class SettingFragment(private val versionName: String,
|
||||
(activity as MainActivity).saveChannelNum(isChecked)
|
||||
}
|
||||
|
||||
val switchBootStartup = _binding?.switchBootStartup
|
||||
switchBootStartup?.isChecked = bootStartup
|
||||
switchBootStartup?.setOnCheckedChangeListener { _, isChecked ->
|
||||
(activity as MainActivity).saveBootStartup(isChecked)
|
||||
}
|
||||
|
||||
return binding.root
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user