diff --git a/app/src/main/java/io/legado/app/utils/ViewModelKt.kt b/app/src/main/java/io/legado/app/utils/ViewModelKt.kt index 0b76009cf..9e1f74f24 100644 --- a/app/src/main/java/io/legado/app/utils/ViewModelKt.kt +++ b/app/src/main/java/io/legado/app/utils/ViewModelKt.kt @@ -8,7 +8,8 @@ import androidx.lifecycle.ViewModelProvider fun AppCompatActivity.getViewModel(clazz: Class) = ViewModelProvider(this).get(clazz) -fun Fragment.getViewModel(clazz: Class) = ViewModelProvider(this).get(clazz) +fun Fragment.getViewModel(clazz: Class) = + ViewModelProvider(this).get(clazz) /** * 与activity数据同步