Skip to content

Commit

Permalink
Split long lines
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarty committed Feb 4, 2022
1 parent 150d557 commit ef3baee
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,20 @@ abstract class MessageLocationItem : AbsMessageItem<MessageLocationItem.Holder>(
.load(location)
.apply(RequestOptions.centerCropTransform())
.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.staticMapErrorTextView.isVisible = true
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 ->
GlideApp.with(holder.staticMapPinImageView)
.load(pinDrawable)
Expand Down

0 comments on commit ef3baee

Please sign in to comment.