manager: auto restart after Display KPM Function and Hide other info (#136)
This commit is contained in:
@@ -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状态开关状态
|
||||||
|
|||||||
Reference in New Issue
Block a user