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