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

This commit is contained in:
lisonge 2024-08-06 20:03:48 +08:00
parent 40f9debd33
commit 670974c5c3
9 changed files with 11 additions and 9 deletions

View File

@ -81,7 +81,7 @@ fun ActivityLogPage() {
IconButton(onClick = throttle(fn = vm.viewModelScope.launchAsFn {
mainVm.dialogFlow.waitResult(
title = "删除记录",
text = "是否删除所有界面记录?",
text = "确定删除所有界面记录?",
error = true,
)
DbSet.activityLogDao.deleteAll()

View File

@ -295,7 +295,8 @@ fun AppItemPage(
vm.viewModelScope.launchTry {
mainVm.dialogFlow.waitResult(
title = "删除规则组",
text = "确定删除规则组 ${group.name} ?"
text = "确定删除规则组 ${group.name} ?",
error = true,
)
val newSubsRaw = subsRaw.copy(
apps = subsRaw.apps

View File

@ -204,7 +204,7 @@ fun CategoryPage(subsItemId: Long) {
vm.viewModelScope.launchTry {
mainVm.dialogFlow.waitResult(
title = "删除类别",
text = "是否删除 ${category.name} ?",
text = "确定删除 ${category.name} ?",
error = true,
)
subsItem?.apply {

View File

@ -126,7 +126,7 @@ fun ClickLogPage() {
IconButton(onClick = throttle(fn = vm.viewModelScope.launchAsFn {
mainVm.dialogFlow.waitResult(
title = "删除记录",
text = "是否删除所有触发记录?",
text = "确定删除所有触发记录?",
error = true,
)
DbSet.clickLogDao.deleteAll()

View File

@ -256,7 +256,7 @@ fun GlobalRulePage(subsItemId: Long, focusGroupKey: Int? = null) {
vm.viewModelScope.launchTry {
mainVm.dialogFlow.waitResult(
title = "删除规则组",
text = "是否删除 ${group.name} ?",
text = "确定删除 ${group.name} ?",
error = true,
)
updateSubscription(

View File

@ -111,7 +111,7 @@ fun SnapshotPage() {
IconButton(onClick = throttle(fn = vm.viewModelScope.launchAsFn(Dispatchers.IO) {
context.mainVm.dialogFlow.waitResult(
title = "删除记录",
text = "是否删除全部快照记录?",
text = "确定删除全部快照记录?",
error = true,
)
snapshots.forEach { s ->

View File

@ -268,7 +268,8 @@ fun SubsPage(
onDelClick = throttle(fn = vm.viewModelScope.launchAsFn {
mainVm.dialogFlow.waitResult(
title = "删除规则组",
text = "确定删除 ${appInfoCache[appRaw.id]?.name ?: appRaw.name ?: appRaw.id} 下所有规则组?"
text = "确定删除 ${appInfoCache[appRaw.id]?.name ?: appRaw.name ?: appRaw.id} 下所有规则组?",
error = true,
)
if (subsRaw != null && subsItem != null) {
updateSubscription(subsRaw.copy(apps = subsRaw.apps.filter { a -> a.id != appRaw.id }))

View File

@ -309,7 +309,7 @@ private fun SubsMenuItem(
vm.viewModelScope.launchTry {
mainVm.dialogFlow.waitResult(
title = "删除订阅",
text = "是否删除 ${subscription?.name ?: subItem.id} ?",
text = "确定删除 ${subscription?.name ?: subItem.id} ?",
error = true,
)
deleteSubscription(subItem.id)

View File

@ -216,7 +216,7 @@ fun useSubsManagePage(): ScaffoldExt {
selectedIds
}
if (canDeleteIds.isNotEmpty()) {
val text = "是否删除所选 ${canDeleteIds.size} 个订阅?".let {
val text = "确定删除所选 ${canDeleteIds.size} 个订阅?".let {
if (selectedIds.contains(LOCAL_SUBS_ID)) "$it\n\n注: 不包含本地订阅" else it
}
IconButton(onClick = vm.viewModelScope.launchAsFn {