feat: showSaveSnapshotToast (#638)

This commit is contained in:
lisonge 2024-07-04 17:56:59 +08:00
parent 8cdd1b75df
commit a6ba66cd27
3 changed files with 14 additions and 1 deletions

View File

@ -89,7 +89,9 @@ object SnapshotExt {
throw RpcError("正在保存快照,不可重复操作")
}
captureLoading.value = true
toast("正在保存快照...")
if (storeFlow.value.showSaveSnapshotToast) {
toast("正在保存快照...")
}
try {
val snapshotDef = coroutineScope { async(Dispatchers.IO) { createComplexSnapshot() } }

View File

@ -335,6 +335,16 @@ fun AdvancedPage() {
)
}
TextSwitch(
name = "保存快照提示",
desc = "保存快照时是否提示\"正在保存快照\"",
checked = store.showSaveSnapshotToast
) {
storeFlow.value = store.copy(
showSaveSnapshotToast = it
)
}
Text(
text = "其它",
modifier = Modifier.titleItemPadding(),

View File

@ -61,6 +61,7 @@ data class Store(
val sortType: Int = SortTypeOption.SortByName.value,
val showSystemApp: Boolean = true,
val showHiddenApp: Boolean = false,
val showSaveSnapshotToast: Boolean = true,
)
val storeFlow by lazy {