manager: fix template status display issue (#2910)
manager: 修复模板状态显示问题 (#2910) 修复当 app 设置过模板后再使用自定义配置,离开页面后再次打开,管理器显示应用使用的是模板而不是自定义配置的问题 - bump AGP version Co-authored-by: u9521 <63995396+u9521@users.noreply.github.com>
This commit is contained in:
@@ -248,7 +248,12 @@ private fun AppProfileInner(
|
|||||||
ProfileBox(mode, true) {
|
ProfileBox(mode, true) {
|
||||||
// template mode shouldn't change profile here!
|
// template mode shouldn't change profile here!
|
||||||
if (it == Mode.Default || it == Mode.Custom) {
|
if (it == Mode.Default || it == Mode.Custom) {
|
||||||
onProfileChange(profile.copy(rootUseDefault = it == Mode.Default))
|
onProfileChange(
|
||||||
|
profile.copy(
|
||||||
|
rootUseDefault = it == Mode.Default,
|
||||||
|
rootTemplate = null
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
mode = it
|
mode = it
|
||||||
}
|
}
|
||||||
@@ -479,7 +484,10 @@ private fun ProfileBox(
|
|||||||
|
|
||||||
@SuppressLint("UnusedBoxWithConstraintsScope")
|
@SuppressLint("UnusedBoxWithConstraintsScope")
|
||||||
@Composable
|
@Composable
|
||||||
private fun AppMenuBox(packageName: String, content: @Composable () -> Unit) {
|
private fun AppMenuBox(
|
||||||
|
packageName: String,
|
||||||
|
content: @Composable () -> Unit
|
||||||
|
) {
|
||||||
var expanded by remember { mutableStateOf(false) }
|
var expanded by remember { mutableStateOf(false) }
|
||||||
var touchPoint: Offset by remember { mutableStateOf(Offset.Zero) }
|
var touchPoint: Offset by remember { mutableStateOf(Offset.Zero) }
|
||||||
val density = LocalDensity.current
|
val density = LocalDensity.current
|
||||||
@@ -499,15 +507,15 @@ private fun AppMenuBox(packageName: String, content: @Composable () -> Unit) {
|
|||||||
content()
|
content()
|
||||||
|
|
||||||
val (offsetX, offsetY) = with(density) {
|
val (offsetX, offsetY) = with(density) {
|
||||||
(touchPoint.x.toDp()) to (touchPoint.y.toDp())
|
(touchPoint.x.toDp()) to (-touchPoint.y.toDp())
|
||||||
}
|
}
|
||||||
|
|
||||||
DropdownMenu(
|
DropdownMenu(
|
||||||
expanded = expanded,
|
expanded = expanded,
|
||||||
offset = DpOffset(offsetX, -offsetY),
|
offset = DpOffset(offsetX, offsetY),
|
||||||
onDismissRequest = {
|
onDismissRequest = {
|
||||||
expanded = false
|
expanded = false
|
||||||
},
|
}
|
||||||
) {
|
) {
|
||||||
AppMenuOption(
|
AppMenuOption(
|
||||||
text = stringResource(id = R.string.launch_app),
|
text = stringResource(id = R.string.launch_app),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[versions]
|
[versions]
|
||||||
accompanist-drawablepainter = "0.37.3"
|
accompanist-drawablepainter = "0.37.3"
|
||||||
agp = "8.13.0"
|
agp = "8.13.1"
|
||||||
gson = "2.13.2"
|
gson = "2.13.2"
|
||||||
kotlin = "2.2.21"
|
kotlin = "2.2.21"
|
||||||
ksp = "2.2.21-2.0.4"
|
ksp = "2.2.21-2.0.4"
|
||||||
|
|||||||
Reference in New Issue
Block a user