From c4ddebfa73ec8f73f3a8f6353288539f8afb7997 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Sat, 7 Mar 2026 00:49:52 +0800 Subject: [PATCH] Remove bottom action buttons from Log tabs, keep only TopAppBar actions Made-with: Cursor --- .../com/topjohnwu/magisk/ui/log/LogScreen.kt | 36 +------------------ 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/app/apk/src/main/java/com/topjohnwu/magisk/ui/log/LogScreen.kt b/app/apk/src/main/java/com/topjohnwu/magisk/ui/log/LogScreen.kt index a3319677e..0a45f4aa5 100644 --- a/app/apk/src/main/java/com/topjohnwu/magisk/ui/log/LogScreen.kt +++ b/app/apk/src/main/java/com/topjohnwu/magisk/ui/log/LogScreen.kt @@ -52,7 +52,6 @@ import top.yukonga.miuix.kmp.basic.MiuixScrollBehavior import top.yukonga.miuix.kmp.basic.Scaffold import top.yukonga.miuix.kmp.basic.TabRow import top.yukonga.miuix.kmp.basic.Text -import top.yukonga.miuix.kmp.basic.TextButton import top.yukonga.miuix.kmp.basic.TopAppBar import top.yukonga.miuix.kmp.theme.MiuixTheme import top.yukonga.miuix.kmp.icon.MiuixIcons @@ -125,13 +124,10 @@ fun LogScreen(viewModel: LogViewModel) { when (selectedTab) { 0 -> SuLogTab( logs = uiState.suLogs, - onClear = { viewModel.clearLog() }, nestedScrollConnection = scrollBehavior.nestedScrollConnection ) 1 -> MagiskLogTab( entries = uiState.magiskLogEntries, - onSave = { viewModel.saveMagiskLog() }, - onClear = { viewModel.clearMagiskLog() }, nestedScrollConnection = scrollBehavior.nestedScrollConnection ) } @@ -141,7 +137,7 @@ fun LogScreen(viewModel: LogViewModel) { } @Composable -private fun SuLogTab(logs: List, onClear: () -> Unit, nestedScrollConnection: NestedScrollConnection) { +private fun SuLogTab(logs: List, nestedScrollConnection: NestedScrollConnection) { Column(modifier = Modifier.fillMaxSize()) { if (logs.isEmpty()) { Box( @@ -170,18 +166,6 @@ private fun SuLogTab(logs: List, onClear: () -> Unit, nestedScrollConnect } } } - - Row( - modifier = Modifier - .fillMaxWidth() - .padding(12.dp), - horizontalArrangement = Arrangement.End - ) { - TextButton( - text = stringResource(CoreR.string.menuClearLog), - onClick = onClear - ) - } } } @@ -292,8 +276,6 @@ private fun SuActionBadge(allowed: Boolean) { @Composable private fun MagiskLogTab( entries: List, - onSave: () -> Unit, - onClear: () -> Unit, nestedScrollConnection: NestedScrollConnection ) { Column(modifier = Modifier.fillMaxSize()) { @@ -326,22 +308,6 @@ private fun MagiskLogTab( } } } - - Row( - modifier = Modifier - .fillMaxWidth() - .padding(12.dp), - horizontalArrangement = Arrangement.spacedBy(8.dp, Alignment.End) - ) { - TextButton( - text = stringResource(CoreR.string.menuSaveLog), - onClick = onSave - ) - TextButton( - text = stringResource(CoreR.string.menuClearLog), - onClick = onClear - ) - } } }