fix: putting out 100 little fires
... before they become an inferno
This commit is contained in:
parent
633ec19c90
commit
1d740d33a0
1 changed files with 4 additions and 15 deletions
|
@ -12,6 +12,7 @@ import ani.dantotsu.databinding.ItemNotificationBinding
|
||||||
import ani.dantotsu.loadImage
|
import ani.dantotsu.loadImage
|
||||||
import ani.dantotsu.profile.activity.NotificationActivity.Companion.NotificationClickType
|
import ani.dantotsu.profile.activity.NotificationActivity.Companion.NotificationClickType
|
||||||
import ani.dantotsu.setAnimation
|
import ani.dantotsu.setAnimation
|
||||||
|
import ani.dantotsu.toPx
|
||||||
import com.xwray.groupie.viewbinding.BindableItem
|
import com.xwray.groupie.viewbinding.BindableItem
|
||||||
|
|
||||||
class NotificationItem(
|
class NotificationItem(
|
||||||
|
@ -40,23 +41,11 @@ class NotificationItem(
|
||||||
?: notification.media?.coverImage?.large
|
?: notification.media?.coverImage?.large
|
||||||
blurImage(binding.notificationBannerImage, cover)
|
blurImage(binding.notificationBannerImage, cover)
|
||||||
|
|
||||||
val defaultHeight = TypedValue.applyDimension(
|
val defaultHeight = 153.toPx
|
||||||
TypedValue.COMPLEX_UNIT_DIP,
|
|
||||||
153f,
|
|
||||||
binding.root.context.resources.displayMetrics
|
|
||||||
).toInt()
|
|
||||||
|
|
||||||
val userHeight = TypedValue.applyDimension(
|
val userHeight = 90.toPx
|
||||||
TypedValue.COMPLEX_UNIT_DIP,
|
|
||||||
90f,
|
|
||||||
binding.root.context.resources.displayMetrics
|
|
||||||
).toInt()
|
|
||||||
|
|
||||||
val textMarginStart = TypedValue.applyDimension(
|
val textMarginStart = 125.toPx
|
||||||
TypedValue.COMPLEX_UNIT_DIP,
|
|
||||||
125f,
|
|
||||||
binding.root.context.resources.displayMetrics
|
|
||||||
).toInt()
|
|
||||||
|
|
||||||
if (user) {
|
if (user) {
|
||||||
binding.notificationCover.visibility = View.GONE
|
binding.notificationCover.visibility = View.GONE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue