From 427eac43137e33cdfe8eafaea37269fd8f33f1d4 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 30 Jan 2020 20:51:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/utils/ViewModelKt.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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数据同步