auto-startup

This commit is contained in:
Li ZongYing
2024-02-19 15:57:39 +08:00
parent ce678b8741
commit 1417bbf57b
11 changed files with 114 additions and 6 deletions
@@ -15,6 +15,7 @@ class SettingFragment(
private val versionCode: Long,
private val channelReversal: Boolean,
private val channelNum: Boolean,
private val bootStartup: Boolean,
) :
DialogFragment() {
@@ -49,6 +50,12 @@ class SettingFragment(
(activity as MainActivity).saveChannelNum(isChecked)
}
val switchBootStartup = _binding?.switchBootStartup
switchBootStartup?.isChecked = bootStartup
switchBootStartup?.setOnCheckedChangeListener { _, isChecked ->
(activity as MainActivity).saveBootStartup(isChecked)
}
updateManager = UpdateManager(context, this, versionCode)
_binding?.checkVersion?.setOnClickListener(OnClickListenerCheckVersion(updateManager))