From 146d20ce86f00095ec8df7509f491735ed1b0612 Mon Sep 17 00:00:00 2001 From: Tamim Hossain <132823494+CodeWithTamim@users.noreply.github.com> Date: Sat, 3 Aug 2024 08:30:38 +0600 Subject: [PATCH] Optimize strState Handling by Removing Redundant try-catch (#3409) Refactored the code for handling the `strState` string to remove the redundant `try-catch` block. Updated to use safe call with the Elvis operator for improved readability and efficiency. This change simplifies the code and reduces the need for exception handling in this context. --- .../src/main/kotlin/com/v2ray/ang/ui/MainRecyclerAdapter.kt | 6 +----- 1 file changed, 1 insertion(+), 5 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 f9c294dc..f933f877 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 @@ -98,11 +98,7 @@ class MainRecyclerAdapter(val activity: MainActivity) : RecyclerView.Adapter