mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 11:38:51 +01:00
Update to latest Glide snapshot
This commit is contained in:
+6
-1
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user