Fix no text visible if using direct pin drawable

This commit is contained in:
Maxime NATUREL 2022-05-18 14:43:53 +02:00
parent 79212321a2
commit bd473375a1

View File

@ -21,6 +21,7 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.core.graphics.drawable.toBitmap
import androidx.lifecycle.lifecycleScope
import com.airbnb.mvrx.args
import com.airbnb.mvrx.fragmentViewModel
@ -180,7 +181,7 @@ class LocationLiveMapViewFragment : VectorBaseFragment<FragmentSimpleContainerBi
private fun addUserPinToMapStyle(userId: String, userPinDrawable: Drawable) {
mapStyle?.let { style ->
if (style.getImage(userId) == null) {
style.addImage(userId, userPinDrawable)
style.addImage(userId, userPinDrawable.toBitmap())
}
}
}