Update to latest Glide snapshot

This commit is contained in:
Moez Bhatti
2018-06-20 18:09:15 -04:00
parent aee60a5cae
commit 735cd03626
3 changed files with 10 additions and 5 deletions
+6 -1
View File
@@ -5,7 +5,8 @@ buildscript {
ext.constraintlayout_version = '1.1.0-beta5'
ext.dagger_version = "2.16"
ext.exoplayer_version = "2.8.1"
ext.glide_version = "4.3.0"
ext.glide_version = "4.8.0-20180619.011009-9"
ext.glide_compiler_version = "4.8.0-20180619.011013-9"
ext.kotlin_version = '1.2.31'
ext.ktx_version = "0.2"
ext.lifecycle_version = '1.1.0'
@@ -41,6 +42,10 @@ allprojects {
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://maven.google.com' }
maven {
name 'glide-snapshot'
url 'http://oss.sonatype.org/content/repositories/snapshots'
}
mavenCentral()
}
}
+1 -1
View File
@@ -95,7 +95,7 @@ dependencies {
// glide
implementation "com.github.bumptech.glide:glide:$glide_version"
kapt "com.github.bumptech.glide:compiler:$glide_version"
kapt "com.github.bumptech.glide:compiler:$glide_compiler_version"
// exoplayer
implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version"
@@ -40,11 +40,11 @@ import javax.inject.Inject
class ContactImageLoader(val context: Context) : ModelLoader<String, InputStream> {
override fun handles(model: String?): Boolean {
override fun handles(model: String): Boolean {
return PhoneNumberUtils.isGlobalPhoneNumber(model)
}
override fun buildLoadData(model: String, width: Int, height: Int, options: Options?): ModelLoader.LoadData<InputStream> {
override fun buildLoadData(model: String, width: Int, height: Int, options: Options): ModelLoader.LoadData<InputStream>? {
return ModelLoader.LoadData(ContactImageKey(model), ContactImageFetcher(context, model))
}
@@ -71,7 +71,7 @@ class ContactImageLoader(val context: Context) : ModelLoader<String, InputStream
override fun getDataClass() = InputStream::class.java
override fun getDataSource() = DataSource.LOCAL
override fun loadData(priority: Priority?, callback: DataFetcher.DataCallback<in InputStream>) {
override fun loadData(priority: Priority, callback: DataFetcher.DataCallback<in InputStream>) {
loadPhotoDisposable = contactRepo.findContactUri(address)
.map { uri -> ContactsContract.Contacts.openContactPhotoInputStream(context.contentResolver, uri) }
.subscribeOn(Schedulers.io())