diff --git a/app/src/main/java/com/moyerun/moyeorun_android/common/extension/ViewExtension.kt b/app/src/main/java/com/moyerun/moyeorun_android/common/extension/ViewExtension.kt index 1a7e690..5af59b2 100644 --- a/app/src/main/java/com/moyerun/moyeorun_android/common/extension/ViewExtension.kt +++ b/app/src/main/java/com/moyerun/moyeorun_android/common/extension/ViewExtension.kt @@ -1,5 +1,6 @@ package com.moyerun.moyeorun_android.common.extension +import android.text.TextUtils import android.view.View import android.widget.RadioButton import android.widget.TextView @@ -21,9 +22,11 @@ fun View.setOnDebounceClickListener(interval: Long = 1000L, action: (View?) -> U } fun TextView.setTextIfNew(text: CharSequence?) { - if (this.text != text) { + if (this.text.contentEquals(text)) { setText(text) } + text?.equals() + text.toString().equals() } fun RadioButton.setCheckIfNew(check: Boolean) {