From f3bfa8ceba0adaff94b9207a15fe12699dca5499 Mon Sep 17 00:00:00 2001 From: Tamim Hossain <132823494+CodeWithTamim@users.noreply.github.com> Date: Sat, 10 Aug 2024 17:54:45 +0600 Subject: [PATCH] Update null safety handling with orEmpty() (#3461) Replaced ?: "" with orEmpty() for improved null safety Updated all instances of the null-coalescing operator (?: "") with orEmpty() to enhance null safety across the codebase. This change ensures that an empty string is used when a nullable value is null, improving consistency and reducing potential null-related issues. --- .../src/main/kotlin/com/v2ray/ang/ui/MainRecyclerAdapter.kt | 2 +- .../app/src/main/kotlin/com/v2ray/ang/ui/ScannerActivity.kt | 4 ++-- .../app/src/main/kotlin/com/v2ray/ang/ui/ServerActivity.kt | 4 ++-- V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/Utils.kt | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/MainRecyclerAdapter.kt b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/MainRecyclerAdapter.kt index f933f877..a5c404af 100644 --- a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/MainRecyclerAdapter.kt +++ b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/MainRecyclerAdapter.kt @@ -164,7 +164,7 @@ class MainRecyclerAdapter(val activity: MainActivity) : RecyclerView.Adapter