|
@@ -57,8 +57,7 @@ fun ImageView.loadConversationAvatar(
|
|
conversation: Conversation,
|
|
conversation: Conversation,
|
|
ignoreCache: Boolean,
|
|
ignoreCache: Boolean,
|
|
viewThemeUtils: ViewThemeUtils?
|
|
viewThemeUtils: ViewThemeUtils?
|
|
-): io.reactivex.disposables
|
|
|
|
-.Disposable {
|
|
|
|
|
|
+): io.reactivex.disposables.Disposable {
|
|
val imageRequestUri = ApiUtils.getUrlForConversationAvatarWithVersion(
|
|
val imageRequestUri = ApiUtils.getUrlForConversationAvatarWithVersion(
|
|
1,
|
|
1,
|
|
user.baseUrl,
|
|
user.baseUrl,
|
|
@@ -100,8 +99,7 @@ fun ImageView.loadUserAvatar(
|
|
avatarId: String,
|
|
avatarId: String,
|
|
requestBigSize: Boolean = true,
|
|
requestBigSize: Boolean = true,
|
|
ignoreCache: Boolean
|
|
ignoreCache: Boolean
|
|
-): io.reactivex.disposables
|
|
|
|
-.Disposable {
|
|
|
|
|
|
+): io.reactivex.disposables.Disposable {
|
|
val imageRequestUri = ApiUtils.getUrlForAvatar(
|
|
val imageRequestUri = ApiUtils.getUrlForAvatar(
|
|
user.baseUrl,
|
|
user.baseUrl,
|
|
avatarId,
|
|
avatarId,
|
|
@@ -117,8 +115,7 @@ private fun ImageView.loadAvatarInternal(
|
|
url: String,
|
|
url: String,
|
|
ignoreCache: Boolean,
|
|
ignoreCache: Boolean,
|
|
errorPlaceholder: Drawable?
|
|
errorPlaceholder: Drawable?
|
|
-): io.reactivex.disposables
|
|
|
|
-.Disposable {
|
|
|
|
|
|
+): io.reactivex.disposables.Disposable {
|
|
val cachePolicy = if (ignoreCache) {
|
|
val cachePolicy = if (ignoreCache) {
|
|
CachePolicy.WRITE_ONLY
|
|
CachePolicy.WRITE_ONLY
|
|
} else {
|
|
} else {
|
|
@@ -215,8 +212,11 @@ fun ImageView.loadImage(url: String, user: User, placeholder: Drawable? = null):
|
|
return DisposableWrapper(context.imageLoader.enqueue(requestBuilder.build()))
|
|
return DisposableWrapper(context.imageLoader.enqueue(requestBuilder.build()))
|
|
}
|
|
}
|
|
|
|
|
|
-fun ImageView.loadAvatarOrImagePreview(url: String, user: User, placeholder: Drawable? = null): io.reactivex
|
|
|
|
-.disposables.Disposable {
|
|
|
|
|
|
+fun ImageView.loadAvatarOrImagePreview(
|
|
|
|
+ url: String,
|
|
|
|
+ user: User,
|
|
|
|
+ placeholder: Drawable? = null
|
|
|
|
+): io.reactivex.disposables.Disposable {
|
|
return if (url.contains("/avatar/")) {
|
|
return if (url.contains("/avatar/")) {
|
|
loadAvatarInternal(user, url, false, null)
|
|
loadAvatarInternal(user, url, false, null)
|
|
} else {
|
|
} else {
|