Fix level transition scrolling and keyboard blank-space behavior
Use commit-summary.txt for AndroidProjectTooling auto-commit messages
This commit is contained in:
@@ -19,8 +19,8 @@ android {
|
||||
applicationId = "solutions.tretter.githugandroid"
|
||||
minSdk = 26
|
||||
targetSdk = 35
|
||||
versionCode = 112
|
||||
versionName = "0.1.111"
|
||||
versionCode = 113
|
||||
versionName = "0.1.112"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
|
||||
@@ -11,10 +11,8 @@ import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.imePadding
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
@@ -92,6 +90,11 @@ fun GitHugApp() {
|
||||
paneLayout = persistedPaneLayout
|
||||
}
|
||||
|
||||
LaunchedEffect(currentLevelIndex) {
|
||||
delay(100)
|
||||
screenScrollState.animateScrollTo(0)
|
||||
}
|
||||
|
||||
fun updatePaneLayout(transform: (PaneLayout) -> PaneLayout, persist: Boolean = true) {
|
||||
val updated = transform(paneLayout)
|
||||
paneLayout = updated
|
||||
@@ -316,7 +319,6 @@ fun GitHugApp() {
|
||||
)
|
||||
scope.launch { persistProgress(updatedCompletedLevels, nextLevelId) }
|
||||
loadLevel(nextLevelIndex, message = emptyList())
|
||||
scope.launch { screenScrollState.animateScrollTo(0) }
|
||||
} else {
|
||||
AppLog.d("GitHugApp", "All levels completed")
|
||||
scope.launch { persistProgress(updatedCompletedLevels, levels.lastOrNull()?.id) }
|
||||
@@ -528,7 +530,6 @@ fun GitHugApp() {
|
||||
)
|
||||
},
|
||||
)
|
||||
Spacer(modifier = Modifier.height(220.dp))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,8 +80,6 @@ fun TerminalPane(
|
||||
val desiredOutputHeight = (output.size.coerceAtLeast(6) * outputLineHeight.value).dp.coerceAtMost(maxOutputHeight)
|
||||
|
||||
LaunchedEffect(inputFieldVersion) {
|
||||
focusRequester.requestFocus()
|
||||
keyboardController?.show()
|
||||
outputHorizontalScroll.scrollTo(0)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user