manager: auto restart after Display KPM Function and Hide other info (#136)

This commit is contained in:
米凛MiRin
2025-06-02 22:24:17 +08:00
committed by GitHub
parent 3bbe415c7e
commit 4aee26b48e

View File

@@ -313,12 +313,28 @@ fun MoreSettingsScreen(
val onHideOtherInfoChange = { newValue: Boolean -> val onHideOtherInfoChange = { newValue: Boolean ->
prefs.edit { putBoolean("is_hide_other_info", newValue) } prefs.edit { putBoolean("is_hide_other_info", newValue) }
isHideOtherInfo = newValue isHideOtherInfo = newValue
val intent = Intent(context, MainActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
context.startActivity(intent)
if (context is Activity) {
context.finish()
}
} }
// 更新显示KPM开关状态 // 更新显示KPM开关状态
val onShowKpmInfoChange = { newValue: Boolean -> val onShowKpmInfoChange = { newValue: Boolean ->
prefs.edit { putBoolean("show_kpm_info", newValue) } prefs.edit { putBoolean("show_kpm_info", newValue) }
isShowKpmInfo = newValue isShowKpmInfo = newValue
val intent = Intent(context, MainActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
context.startActivity(intent)
if (context is Activity) {
context.finish()
}
} }
// 隐藏SuSFS状态开关状态 // 隐藏SuSFS状态开关状态