From 44f6391cb42bcb7bb5729dab8dd6d409023d9d91 Mon Sep 17 00:00:00 2001 From: ganfra Date: Tue, 1 Oct 2019 20:11:15 +0200 Subject: [PATCH] Optimize: use LazyThreeTen --- vector/build.gradle | 4 +++- vector/src/main/java/im/vector/riotx/VectorApplication.kt | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/vector/build.gradle b/vector/build.gradle index 16bf70aef0..3073d0f8f7 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -234,7 +234,9 @@ dependencies { implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta1' implementation 'androidx.core:core-ktx:1.0.2' - implementation 'com.jakewharton.threetenabp:threetenabp:1.1.1' + implementation "org.threeten:threetenbp:1.4.0:no-tzdb" + implementation "com.gabrielittner.threetenbp:lazythreetenbp:0.7.0" + implementation "com.squareup.moshi:moshi-adapters:$moshi_version" kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshi_version" diff --git a/vector/src/main/java/im/vector/riotx/VectorApplication.kt b/vector/src/main/java/im/vector/riotx/VectorApplication.kt index bf56e71915..4884354ef3 100644 --- a/vector/src/main/java/im/vector/riotx/VectorApplication.kt +++ b/vector/src/main/java/im/vector/riotx/VectorApplication.kt @@ -31,9 +31,9 @@ import androidx.multidex.MultiDex import com.airbnb.epoxy.EpoxyAsyncUtil import com.airbnb.epoxy.EpoxyController import com.facebook.stetho.Stetho +import com.gabrielittner.threetenbp.LazyThreeTen import com.github.piasy.biv.BigImageViewer import com.github.piasy.biv.loader.glide.GlideImageLoader -import com.jakewharton.threetenabp.AndroidThreeTen import im.vector.matrix.android.api.Matrix import im.vector.matrix.android.api.MatrixConfiguration import im.vector.matrix.android.api.auth.Authenticator @@ -96,7 +96,8 @@ class VectorApplication : Application(), HasVectorInjector, MatrixConfiguration. Stetho.initializeWithDefaults(this) } logInfo() - AndroidThreeTen.init(this) + LazyThreeTen.init(this) + BigImageViewer.initialize(GlideImageLoader.with(applicationContext)) EpoxyController.defaultDiffingHandler = EpoxyAsyncUtil.getAsyncBackgroundHandler() EpoxyController.defaultModelBuildingHandler = EpoxyAsyncUtil.getAsyncBackgroundHandler()