mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +00:00
Unchecked code
This commit is contained in:
parent
2c4b8bf443
commit
bbac0939f5
@ -1,13 +1,14 @@
|
||||
package org.thoughtcrime.securesms.messagerequests
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.ColorStateList
|
||||
import android.database.Cursor
|
||||
import android.os.Build
|
||||
import android.text.SpannableString
|
||||
import android.text.style.ForegroundColorSpan
|
||||
import android.view.ContextThemeWrapper
|
||||
import android.view.ViewGroup
|
||||
import android.widget.PopupMenu
|
||||
import androidx.core.graphics.drawable.DrawableCompat
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import network.loki.messenger.R
|
||||
import org.session.libsession.utilities.ThemeUtil
|
||||
@ -63,10 +64,17 @@ class MessageRequestsAdapter(
|
||||
val s = SpannableString(item.title)
|
||||
val danger = ThemeUtil.getThemedColor(context, R.attr.danger)
|
||||
s.setSpan(ForegroundColorSpan(danger), 0, s.length, 0)
|
||||
item.iconTintList = ColorStateList.valueOf(danger)
|
||||
item.icon?.let {
|
||||
DrawableCompat.setTint(
|
||||
it,
|
||||
danger
|
||||
)
|
||||
}
|
||||
item.title = s
|
||||
}
|
||||
popupMenu.setForceShowIcon(true)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
popupMenu.setForceShowIcon(true)
|
||||
}
|
||||
popupMenu.show()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user