Fix build failure: SubEditActivity Kotlin compile errors - #27
Conversation
…ble buildSubItem result Co-authored-by: patterniha <71074308+patterniha@users.noreply.github.com>
|
@copilot |
I checked carefully — the failing code is not in upstream 2dust/v2rayNG. The upstream
So the build failure was in the PattNG-specific feature code merged on top of upstream, not in upstream's shared code. The failing CI run (35714483160) also built a different tree ( |
The CI
buildjob failed at:app:compilePlaystoreDebugKotlinwith three errors inSubEditActivity.kt: two unresolvedtoastreferences and a nullable/non-null type mismatch on the save path.Changes
SubEditScreencallscontext.toast(...)for validation errors, but onlytoastSuccesswas imported. Addedcom.v2ray.ang.extension.toast.buildSubItem()returnsSubscriptionItem?(null after showing an error toast for an invalid override port or an Aether exit-chain selection), but its result was passed directly to the non-nullonSaveparameter. The save action now proceeds only on a non-null result:On the null path no save occurs, which matches the existing behavior since
buildSubItem()has already surfaced the error toast.