Skip to content

Commit 8bd1445

Browse files
committed
[#30] 로그인 기능 추가 - setTextIfNew 수정
1 parent 48a5021 commit 8bd1445

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/src/main/java/com/moyerun/moyeorun_android/common/extension/ViewExtension.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.moyerun.moyeorun_android.common.extension
22

3+
import android.text.TextUtils
34
import android.view.View
45
import android.widget.RadioButton
56
import android.widget.TextView
@@ -21,9 +22,11 @@ fun View.setOnDebounceClickListener(interval: Long = 1000L, action: (View?) -> U
2122
}
2223

2324
fun TextView.setTextIfNew(text: CharSequence?) {
24-
if (this.text != text) {
25+
if (this.text.contentEquals(text)) {
2526
setText(text)
2627
}
28+
text?.equals()
29+
text.toString().equals()
2730
}
2831

2932
fun RadioButton.setCheckIfNew(check: Boolean) {

0 commit comments

Comments
 (0)