diff --git a/app/src/main/java/li/songe/gkd/ui/DebugPage.kt b/app/src/main/java/li/songe/gkd/ui/DebugPage.kt index 4be08dc..613ad4f 100644 --- a/app/src/main/java/li/songe/gkd/ui/DebugPage.kt +++ b/app/src/main/java/li/songe/gkd/ui/DebugPage.kt @@ -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) diff --git a/app/src/main/java/li/songe/gkd/util/Store.kt b/app/src/main/java/li/songe/gkd/util/Store.kt index 5262c3f..3f8cd56 100644 --- a/app/src/main/java/li/songe/gkd/util/Store.kt +++ b/app/src/main/java/li/songe/gkd/util/Store.kt @@ -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 {