mirror of
https://github.com/gkd-kit/gkd.git
synced 2024-11-16 03:32:38 +08:00
feat: showSaveSnapshotToast (#638)
This commit is contained in:
parent
8cdd1b75df
commit
a6ba66cd27
|
@ -89,7 +89,9 @@ object SnapshotExt {
|
||||||
throw RpcError("正在保存快照,不可重复操作")
|
throw RpcError("正在保存快照,不可重复操作")
|
||||||
}
|
}
|
||||||
captureLoading.value = true
|
captureLoading.value = true
|
||||||
|
if (storeFlow.value.showSaveSnapshotToast) {
|
||||||
toast("正在保存快照...")
|
toast("正在保存快照...")
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
val snapshotDef = coroutineScope { async(Dispatchers.IO) { createComplexSnapshot() } }
|
val snapshotDef = coroutineScope { async(Dispatchers.IO) { createComplexSnapshot() } }
|
||||||
|
|
|
@ -335,6 +335,16 @@ fun AdvancedPage() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextSwitch(
|
||||||
|
name = "保存快照提示",
|
||||||
|
desc = "保存快照时是否提示\"正在保存快照\"",
|
||||||
|
checked = store.showSaveSnapshotToast
|
||||||
|
) {
|
||||||
|
storeFlow.value = store.copy(
|
||||||
|
showSaveSnapshotToast = it
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = "其它",
|
text = "其它",
|
||||||
modifier = Modifier.titleItemPadding(),
|
modifier = Modifier.titleItemPadding(),
|
||||||
|
|
|
@ -61,6 +61,7 @@ data class Store(
|
||||||
val sortType: Int = SortTypeOption.SortByName.value,
|
val sortType: Int = SortTypeOption.SortByName.value,
|
||||||
val showSystemApp: Boolean = true,
|
val showSystemApp: Boolean = true,
|
||||||
val showHiddenApp: Boolean = false,
|
val showHiddenApp: Boolean = false,
|
||||||
|
val showSaveSnapshotToast: Boolean = true,
|
||||||
)
|
)
|
||||||
|
|
||||||
val storeFlow by lazy {
|
val storeFlow by lazy {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user