mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-23 18:05:59 +03:00
Split long lines
This commit is contained in:
parent
150d557d39
commit
ef3baee35b
1 changed files with 9 additions and 2 deletions
|
@ -73,13 +73,20 @@ abstract class MessageLocationItem : AbsMessageItem<MessageLocationItem.Holder>(
|
||||||
.load(location)
|
.load(location)
|
||||||
.apply(RequestOptions.centerCropTransform())
|
.apply(RequestOptions.centerCropTransform())
|
||||||
.listener(object : RequestListener<Drawable> {
|
.listener(object : RequestListener<Drawable> {
|
||||||
override fun onLoadFailed(e: GlideException?, model: Any?, target: Target<Drawable>?, isFirstResource: Boolean): Boolean {
|
override fun onLoadFailed(e: GlideException?,
|
||||||
|
model: Any?,
|
||||||
|
target: Target<Drawable>?,
|
||||||
|
isFirstResource: Boolean): Boolean {
|
||||||
holder.staticMapPinImageView.setImageResource(R.drawable.ic_location_pin_failed)
|
holder.staticMapPinImageView.setImageResource(R.drawable.ic_location_pin_failed)
|
||||||
holder.staticMapErrorTextView.isVisible = true
|
holder.staticMapErrorTextView.isVisible = true
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResourceReady(resource: Drawable?, model: Any?, target: Target<Drawable>?, dataSource: DataSource?, isFirstResource: Boolean): Boolean {
|
override fun onResourceReady(resource: Drawable?,
|
||||||
|
model: Any?,
|
||||||
|
target: Target<Drawable>?,
|
||||||
|
dataSource: DataSource?,
|
||||||
|
isFirstResource: Boolean): Boolean {
|
||||||
locationPinProvider?.create(userId) { pinDrawable ->
|
locationPinProvider?.create(userId) { pinDrawable ->
|
||||||
GlideApp.with(holder.staticMapPinImageView)
|
GlideApp.with(holder.staticMapPinImageView)
|
||||||
.load(pinDrawable)
|
.load(pinDrawable)
|
||||||
|
|
Loading…
Reference in a new issue