perf: dialog dismissButton
Some checks are pending
Build-Apk / build (push) Waiting to run

This commit is contained in:
lisonge 2024-08-05 17:26:04 +08:00
parent 602879da5f
commit 2381bd6c9b
2 changed files with 20 additions and 6 deletions

View File

@ -7,7 +7,6 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.defaultMinSize
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
@ -344,7 +343,6 @@ fun AppItemPage(
showGroupItem?.let { showGroupItemVal ->
AlertDialog(
modifier = Modifier.defaultMinSize(300.dp),
onDismissRequest = { setShowGroupItem(null) },
title = {
Text(text = "规则组详情")
@ -352,8 +350,10 @@ fun AppItemPage(
text = {
Column {
Text(text = showGroupItemVal.name)
Spacer(modifier = Modifier.height(10.dp))
Text(text = showGroupItemVal.desc ?: "")
if (showGroupItemVal.desc != null) {
Spacer(modifier = Modifier.height(10.dp))
Text(text = showGroupItemVal.desc)
}
}
},
confirmButton = {
@ -371,7 +371,15 @@ fun AppItemPage(
Text(text = "查看图片")
}
}
})
},
dismissButton = {
TextButton(onClick = throttle {
setShowGroupItem(null)
}) {
Text(text = "关闭")
}
}
)
}
if (editGroupRaw != null && subsItem != null) {

View File

@ -484,6 +484,12 @@ fun GlobalRulePage(subsItemId: Long, focusGroupKey: Int? = null) {
Text(text = "查看图片")
}
}
})
},
dismissButton = {
TextButton(onClick = { setShowGroupItem(null) }) {
Text(text = "关闭")
}
}
)
}
}