feat(快照): 支持隐藏快照状态栏

This commit is contained in:
lisonge 2023-09-28 17:42:14 +08:00
parent 23ea7599bb
commit 2b95dd961c
2 changed files with 14 additions and 3 deletions

View File

@ -36,7 +36,6 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import androidx.core.app.NotificationManagerCompat
import androidx.core.content.ContextCompat
import com.blankj.utilcode.util.LogUtils
import com.blankj.utilcode.util.ToastUtils
import com.dylanc.activityresult.launcher.launchForResult
import com.ramcosta.composedestinations.annotation.Destination
@ -96,8 +95,7 @@ fun DebugPage() {
if (shizukuIsOk) {
// check method type
appScope.launchTry(Dispatchers.IO) {
LogUtils.d(newActivityTaskManager()?.safeGetTasks()
?.map { t -> t.topActivity?.className })
newActivityTaskManager()?.safeGetTasks()
}
}
})
@ -206,6 +204,18 @@ fun DebugPage() {
}
}
Divider()
TextSwitch(
name = "隐藏快照状态栏",
desc = "当保存快照时,隐藏截图里的顶部状态栏高度区域",
checked = store.hideSnapshotStatusBar
) {
updateStorage(
storeFlow, store.copy(
hideSnapshotStatusBar = it
)
)
}
Divider()
SettingItem(title = "快照记录", onClick = {
navController.navigate(SnapshotPageDestination)

View File

@ -83,6 +83,7 @@ data class Store(
val toastWhenClick: Boolean = true,
val clickToast: String = "跳过",
val autoClearMemorySubs: Boolean = true,
val hideSnapshotStatusBar: Boolean = false,
) : Parcelable
val storeFlow by lazy {