From 4809b5444b7b3488e58e6b6e96e5d17f77d545b0 Mon Sep 17 00:00:00 2001 From: alansley Date: Tue, 27 Aug 2024 15:12:39 +1000 Subject: [PATCH] Removed unused 'isEmpty' utility methods --- .../securesms/conversation/v2/Util.kt | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/Util.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/Util.kt index c025f64159..f2b19f539b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/Util.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/Util.kt @@ -21,10 +21,8 @@ import android.net.Uri import android.text.TextUtils import android.view.View import com.annimon.stream.Stream -import com.google.android.mms.pdu_alt.EncodedStringValue import java.util.Collections import org.session.libsignal.utilities.Log -import org.thoughtcrime.securesms.components.ComposeText object Util { private val TAG: String = Log.tag(Util::class.java) @@ -84,22 +82,6 @@ object Util { return sb.toString() } - fun isEmpty(value: Array?): Boolean { - return value == null || value.size == 0 - } - - fun isEmpty(value: ComposeText?): Boolean { - return value == null || value.text == null || TextUtils.isEmpty(value.textTrimmed) - } - - fun isEmpty(collection: Collection<*>?): Boolean { - return collection == null || collection.isEmpty() - } - - fun isEmpty(charSequence: CharSequence?): Boolean { - return charSequence.isNullOrEmpty() - } - fun wait(lock: Any, timeout: Long) { try { (lock as Object).wait(timeout) @@ -115,8 +97,7 @@ object Util { return results } - val elements = - source.split(delimiter.toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray() + val elements = source.split(delimiter.toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray() Collections.addAll(results, *elements) return results