fix: missing of START_APP_CUSTOM saving
This commit is contained in:
@@ -40,8 +40,8 @@ android {
|
||||
applicationId = "io.github.miuzarte.scrcpyforandroid"
|
||||
minSdk = 26
|
||||
targetSdk = 36
|
||||
versionCode = 8
|
||||
versionName = "0.1.2"
|
||||
versionCode = 9
|
||||
versionName = "0.1.3"
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
|
||||
@@ -83,7 +83,6 @@ import top.yukonga.miuix.kmp.basic.ScrollBehavior
|
||||
import top.yukonga.miuix.kmp.basic.SnackbarHost
|
||||
import top.yukonga.miuix.kmp.basic.SpinnerEntry
|
||||
import top.yukonga.miuix.kmp.basic.TabRow
|
||||
import top.yukonga.miuix.kmp.basic.TabRowWithContour
|
||||
import top.yukonga.miuix.kmp.basic.Text
|
||||
import top.yukonga.miuix.kmp.basic.TextButton
|
||||
import top.yukonga.miuix.kmp.basic.TextField
|
||||
@@ -261,7 +260,9 @@ internal fun ScrcpyAllOptionsScreen(
|
||||
}
|
||||
}
|
||||
},
|
||||
modifier = Modifier.padding(bottom = UiSpacing.Medium).padding(horizontal = UiSpacing.Medium),
|
||||
modifier = Modifier
|
||||
.padding(bottom = UiSpacing.Medium)
|
||||
.padding(horizontal = UiSpacing.Medium),
|
||||
minWidth = 96.dp,
|
||||
maxWidth = 192.dp,
|
||||
height = 48.dp,
|
||||
@@ -1105,7 +1106,9 @@ internal fun ScrcpyAllOptionsPage(
|
||||
showKeyPoints = true,
|
||||
keyPoints = ScrcpyPresets.MaxSize.indices.map { it.toFloat() },
|
||||
displayText = soBundle.maxSize.toString(),
|
||||
inputInitialValue = soBundle.maxSize.takeIf { it != 0 }?.toString()
|
||||
inputInitialValue = soBundle.maxSize
|
||||
.takeIf { it != 0 }
|
||||
?.toString()
|
||||
?: "",
|
||||
inputFilter = { it.filter(Char::isDigit) },
|
||||
inputValueRange = 0f..UInt.MAX_VALUE.toFloat(),
|
||||
@@ -1245,8 +1248,9 @@ internal fun ScrcpyAllOptionsPage(
|
||||
|
||||
else -> {
|
||||
// 选择列表中的实际分辨率
|
||||
val selectedCameraSize = cameraSizes[it - 2]
|
||||
soBundle = soBundle.copy(
|
||||
cameraSize = cameraSizeDropdownItems[it],
|
||||
cameraSize = selectedCameraSize,
|
||||
cameraSizeUseCustom = false,
|
||||
)
|
||||
cameraSizeCustomInput = ""
|
||||
@@ -1597,11 +1601,9 @@ internal fun ScrcpyAllOptionsPage(
|
||||
value = startAppCustomInput,
|
||||
onValueChange = { startAppCustomInput = it },
|
||||
onFocusLost = {
|
||||
val matchedAppIndex = apps
|
||||
.indexOfFirst { it.packageName == startAppCustomInput }
|
||||
soBundle = if (matchedAppIndex >= 0) {
|
||||
soBundle = if (startAppCustomInput in apps.map { it.packageName }) {
|
||||
soBundle.copy(
|
||||
startApp = apps[matchedAppIndex].packageName,
|
||||
startApp = startAppCustomInput,
|
||||
startAppUseCustom = false,
|
||||
)
|
||||
} else {
|
||||
|
||||
@@ -480,6 +480,8 @@ class ScrcpyOptions(context: Context) : Settings(context, "ScrcpyOptions") {
|
||||
bundleField(AUDIO_DUP) { bundle: Bundle -> bundle.audioDup },
|
||||
bundleField(NEW_DISPLAY) { bundle: Bundle -> bundle.newDisplay },
|
||||
bundleField(START_APP) { bundle: Bundle -> bundle.startApp },
|
||||
bundleField(START_APP_CUSTOM) { bundle: Bundle -> bundle.startAppCustom },
|
||||
bundleField(START_APP_USE_CUSTOM) { bundle: Bundle -> bundle.startAppUseCustom },
|
||||
bundleField(VD_DESTROY_CONTENT) { bundle: Bundle -> bundle.vdDestroyContent },
|
||||
bundleField(VD_SYSTEM_DECORATIONS) { bundle: Bundle -> bundle.vdSystemDecorations },
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user