From 43d5e2099f48e1f40303691cdb01ddb32f2194d8 Mon Sep 17 00:00:00 2001 From: Joe Tretter Date: Thu, 23 Apr 2026 22:28:29 -0500 Subject: [PATCH] Auto-commit after successful build: update app gameplay/UI, improve build setup Changed files:\napp/build.gradle.kts app/src/main/java/com/kawomi/githugandroid/Terminal.kt --- app/build.gradle.kts | 4 ++-- .../java/com/kawomi/githugandroid/Terminal.kt | 22 +++---------------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 9394be9..8f80b53 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -11,8 +11,8 @@ android { applicationId = "com.kawomi.githugandroid" minSdk = 26 targetSdk = 34 - versionCode = 51 - versionName = "0.1.50" + versionCode = 55 + versionName = "0.1.54" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true diff --git a/app/src/main/java/com/kawomi/githugandroid/Terminal.kt b/app/src/main/java/com/kawomi/githugandroid/Terminal.kt index 60912cc..54af5df 100644 --- a/app/src/main/java/com/kawomi/githugandroid/Terminal.kt +++ b/app/src/main/java/com/kawomi/githugandroid/Terminal.kt @@ -18,8 +18,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.widthIn import androidx.compose.foundation.rememberScrollState -import androidx.compose.foundation.relocation.BringIntoViewRequester -import androidx.compose.foundation.relocation.bringIntoViewRequester import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.text.BasicTextField import androidx.compose.foundation.text.KeyboardActions @@ -32,7 +30,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.key import androidx.compose.runtime.remember -import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.focus.FocusRequester @@ -51,8 +48,6 @@ import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.text.input.TextFieldValue import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import kotlinx.coroutines.delay -import kotlinx.coroutines.launch @OptIn(ExperimentalFoundationApi::class) @Composable @@ -71,7 +66,6 @@ fun TerminalPane( ) { val configuration = LocalConfiguration.current val focusRequester = remember { FocusRequester() } - val bringIntoViewRequester = remember { BringIntoViewRequester() } val focusManager = LocalFocusManager.current val keyboardController = LocalSoftwareKeyboardController.current val horizontalScroll = rememberScrollState() @@ -90,13 +84,13 @@ fun TerminalPane( } LaunchedEffect(output.size) { - //outputVerticalScroll.animateScrollTo(outputVerticalScroll.maxValue) + outputVerticalScroll.animateScrollTo(outputVerticalScroll.maxValue) } LaunchedEffect(output.size, commandInput.text) { - if (output.isNotEmpty() && commandInput.text.isEmpty()) { + //if (output.isNotEmpty() && commandInput.text.isEmpty()) { horizontalScroll.scrollTo(0) - } + //} } fun submitCommand() { @@ -147,7 +141,6 @@ fun TerminalPane( ) Row( modifier = Modifier - .bringIntoViewRequester(bringIntoViewRequester) .fillMaxWidth() .widthIn(min = terminalMinWidth) .background(PanelPrimary, RoundedCornerShape(8.dp)) @@ -167,7 +160,6 @@ fun TerminalPane( commandInput = commandInput, onValueChange = onValueChange, focusRequester = focusRequester, - bringIntoViewRequester = bringIntoViewRequester, keyboardController = keyboardController, onSubmit = { submitCommand() }, ) @@ -183,12 +175,9 @@ private fun RowScope.TerminalInputField( commandInput: TextFieldValue, onValueChange: (TextFieldValue) -> Unit, focusRequester: FocusRequester, - bringIntoViewRequester: BringIntoViewRequester, keyboardController: androidx.compose.ui.platform.SoftwareKeyboardController?, onSubmit: () -> Unit, ) { - val scope = rememberCoroutineScope() - key(inputFieldVersion) { BasicTextField( value = commandInput, @@ -196,14 +185,9 @@ private fun RowScope.TerminalInputField( modifier = Modifier .weight(1f) .focusRequester(focusRequester) - .bringIntoViewRequester(bringIntoViewRequester) .onFocusChanged { state -> if (state.isFocused) { keyboardController?.show() - scope.launch { - delay(150) - bringIntoViewRequester.bringIntoView() - } } }, singleLine = true,