mirror of
https://github.com/nextcloud/talk-android
synced 2025-02-03 05:03:04 +00:00
decrease lint warnings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
ffdc630b76
commit
60827afe5c
@ -19,6 +19,7 @@ import android.widget.ImageView
|
||||
import android.widget.RelativeLayout
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.emoji.widget.EmojiTextView
|
||||
import autodagger.AutoInjector
|
||||
@ -122,8 +123,8 @@ class IncomingLocationMessageViewHolder(incomingView: View) : MessageHolders
|
||||
// do nothing, avatar is set
|
||||
} else if (message.actorType == "bots" && message.actorId == "changelog") {
|
||||
val layers = arrayOfNulls<Drawable>(2)
|
||||
layers[0] = context?.getDrawable(R.drawable.ic_launcher_background)
|
||||
layers[1] = context?.getDrawable(R.drawable.ic_launcher_foreground)
|
||||
layers[0] = AppCompatResources.getDrawable(context!!, R.drawable.ic_launcher_background)
|
||||
layers[1] = AppCompatResources.getDrawable(context!!, R.drawable.ic_launcher_foreground)
|
||||
val layerDrawable = LayerDrawable(layers)
|
||||
messageUserAvatarView?.setImageDrawable(DisplayUtils.getRoundedDrawable(layerDrawable))
|
||||
} else if (message.actorType == "bots") {
|
||||
|
@ -17,6 +17,7 @@ import android.widget.ImageView
|
||||
import android.widget.RelativeLayout
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.emoji.widget.EmojiTextView
|
||||
import autodagger.AutoInjector
|
||||
@ -203,7 +204,7 @@ class OutcomingLocationMessageViewHolder(incomingView: View) : MessageHolders
|
||||
}
|
||||
|
||||
readStatusDrawableInt?.let { drawableInt ->
|
||||
context?.resources?.getDrawable(drawableInt, null)?.let {
|
||||
AppCompatResources.getDrawable(context!!, drawableInt)?.let {
|
||||
it.setColorFilter(context?.resources!!.getColor(R.color.white60), PorterDuff.Mode.SRC_ATOP)
|
||||
checkMark?.setImageDrawable(it)
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ class LocationPickerController(args: Bundle) : BaseController(args), SearchView.
|
||||
myLocation = GeoPoint(13.0, 52.0)
|
||||
|
||||
var zoomToCurrentPositionAllowed = !receivedChosenGeocodingResult
|
||||
locationOverlay.runOnFirstFix(Runnable {
|
||||
locationOverlay.runOnFirstFix {
|
||||
myLocation = locationOverlay.myLocation
|
||||
if (zoomToCurrentPositionAllowed) {
|
||||
activity!!.runOnUiThread {
|
||||
@ -246,16 +246,16 @@ class LocationPickerController(args: Bundle) : BaseController(args), SearchView.
|
||||
mapController?.setCenter(myLocation)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (receivedChosenGeocodingResult && geocodedLat != 0.0 && geocodedLon != 0.0) {
|
||||
mapController?.setCenter(GeoPoint(geocodedLat, geocodedLon))
|
||||
}
|
||||
|
||||
btCenterMap?.setOnClickListener(View.OnClickListener {
|
||||
btCenterMap?.setOnClickListener {
|
||||
mapController?.animateTo(myLocation)
|
||||
moveToCurrentLocationWasClicked = true
|
||||
})
|
||||
}
|
||||
|
||||
map?.addMapListener(DelayedMapListener(object : MapListener {
|
||||
override fun onScroll(paramScrollEvent: ScrollEvent): Boolean {
|
||||
@ -422,7 +422,7 @@ class LocationPickerController(args: Bundle) : BaseController(args), SearchView.
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val TAG = "LocationPickerController"
|
||||
private val REQUEST_PERMISSIONS_REQUEST_CODE = 1
|
||||
private const val TAG = "LocationPicker"
|
||||
private const val REQUEST_PERMISSIONS_REQUEST_CODE = 1
|
||||
}
|
||||
}
|
||||
|
@ -49,6 +49,8 @@ buildscript {
|
||||
configurations.all {
|
||||
// check for updates every build
|
||||
resolutionStrategy.cacheChangingModulesFor 3600, 'seconds'
|
||||
exclude module: 'httpclient'
|
||||
exclude module: 'commons-logging'
|
||||
}
|
||||
|
||||
allprojects {
|
||||
|
Loading…
Reference in New Issue
Block a user