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