Skip to content

Commit 41a5541

Browse files
committed
refactor: update KavaRef usage to 1.0.1
1 parent 260fab2 commit 41a5541

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

gradle/sweet-dependency/sweet-dependency-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ libraries:
3838
version: 1.0.2
3939
com.highcapable.kavaref:
4040
kavaref-core:
41-
version: 1.0.0
41+
version: 1.0.1
4242
kavaref-extension:
43-
version: 1.0.0
43+
version: 1.0.1
4444
androidx.core:
4545
core:
4646
version: 1.16.0

pangutext-android/src/main/java/com/highcapable/pangutext/android/core/PanguTextWatcher.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import android.text.TextWatcher
2626
import android.widget.EditText
2727
import android.widget.TextView
2828
import com.highcapable.betterandroid.system.extension.tool.SystemVersion
29-
import com.highcapable.kavaref.KavaRef.Companion.resolve
29+
import com.highcapable.kavaref.KavaRef.Companion.asResolver
3030
import com.highcapable.pangutext.android.PanguText
3131
import com.highcapable.pangutext.android.PanguTextConfig
3232
import com.highcapable.pangutext.android.extension.injectRealTimePanguText
@@ -45,7 +45,7 @@ class PanguTextWatcher internal constructor(private val base: TextView, private
4545
* @return [ArrayList]<[TextWatcher]>.
4646
*/
4747
private val textWatchers
48-
get() = base.resolve().optional(silent = true).firstFieldOrNull {
48+
get() = base.asResolver().optional(silent = true).firstFieldOrNull {
4949
name = "mListeners"
5050
superclass()
5151
}?.getQuietly<ArrayList<TextWatcher>>()

pangutext-android/src/main/java/com/highcapable/pangutext/android/factory/PanguTextFactory2.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import android.util.Log
2929
import android.view.LayoutInflater
3030
import android.view.View
3131
import com.highcapable.betterandroid.ui.extension.view.layoutInflater
32-
import com.highcapable.kavaref.KavaRef.Companion.resolve
32+
import com.highcapable.kavaref.KavaRef.Companion.asResolver
3333
import com.highcapable.pangutext.android.generated.PangutextAndroidProperties
3434

3535
/**
@@ -109,7 +109,7 @@ class PanguTextFactory2 private constructor(private val base: LayoutInflater.Fac
109109
}
110110
val replacement = PanguTextFactory2(original)
111111
if (original != null)
112-
inflater.resolve().optional(silent = true).firstFieldOrNull {
112+
inflater.asResolver().optional(silent = true).firstFieldOrNull {
113113
name = "mFactory2"
114114
superclass()
115115
}?.setQuietly(replacement) ?: Log.e(PangutextAndroidProperties.PROJECT_NAME, "LayoutInflater.mFactory2 not found.")

0 commit comments

Comments
 (0)