mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-15 13:47:09 +02:00
fix: ff menu dimensions
This commit is contained in:
parent
ab8c4ddb66
commit
d18dff61d3
@ -191,9 +191,9 @@ class FriendFeedInfoMenu : AbstractMenu() {
|
|||||||
|
|
||||||
private fun getCurrentConversationId(): Pair<String, String?> {
|
private fun getCurrentConversationId(): Pair<String, String?> {
|
||||||
val messaging = context.feature(Messaging::class)
|
val messaging = context.feature(Messaging::class)
|
||||||
var focusedConversationTargetUser: String? = null
|
val focusedConversationTargetUser: String? = messaging.lastFetchConversationUserUUID?.toString()
|
||||||
val conversationId = if (messaging.lastFetchConversationUUID == null) {
|
|
||||||
focusedConversationTargetUser = messaging.lastFetchConversationUserUUID.toString()
|
val conversationId = if (messaging.lastFetchConversationUUID == null && focusedConversationTargetUser != null) {
|
||||||
val conversation: UserConversationLink = context.database.getDMConversationIdFromUserId(focusedConversationTargetUser) ?: throw IllegalStateException("No conversation found")
|
val conversation: UserConversationLink = context.database.getDMConversationIdFromUserId(focusedConversationTargetUser) ?: throw IllegalStateException("No conversation found")
|
||||||
conversation.client_conversation_id!!.trim().lowercase()
|
conversation.client_conversation_id!!.trim().lowercase()
|
||||||
} else {
|
} else {
|
||||||
@ -214,10 +214,6 @@ class FriendFeedInfoMenu : AbstractMenu() {
|
|||||||
viewConsumer(switch)
|
viewConsumer(switch)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun injectOldButtons(viewModel: View, viewConsumer: ((View) -> Unit)) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n", "UseSwitchCompatOrMaterialCode", "DefaultLocale", "InflateParams",
|
@SuppressLint("SetTextI18n", "UseSwitchCompatOrMaterialCode", "DefaultLocale", "InflateParams",
|
||||||
"DiscouragedApi", "ClickableViewAccessibility"
|
"DiscouragedApi", "ClickableViewAccessibility"
|
||||||
)
|
)
|
||||||
@ -291,10 +287,7 @@ class FriendFeedInfoMenu : AbstractMenu() {
|
|||||||
menuButtonBar.addView(LinearLayout(viewModel.context).apply {
|
menuButtonBar.addView(LinearLayout(viewModel.context).apply {
|
||||||
layoutParams = LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT, 1f)
|
layoutParams = LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT, 1f)
|
||||||
gravity = Gravity.CENTER
|
gravity = Gravity.CENTER
|
||||||
setPadding(0, 20, 0, 20)
|
isClickable = false
|
||||||
isClickable = true
|
|
||||||
scaleX = 1.1f
|
|
||||||
scaleY = 1.1f
|
|
||||||
|
|
||||||
var isLineThrough = isDisabled ?: false
|
var isLineThrough = isDisabled ?: false
|
||||||
FriendActionButton.new(viewModel.context).apply {
|
FriendActionButton.new(viewModel.context).apply {
|
||||||
@ -304,7 +297,7 @@ class FriendFeedInfoMenu : AbstractMenu() {
|
|||||||
setLineThrough(isLineThrough)
|
setLineThrough(isLineThrough)
|
||||||
(instanceNonNull() as View).apply {
|
(instanceNonNull() as View).apply {
|
||||||
layoutParams = LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT).apply {
|
layoutParams = LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT).apply {
|
||||||
setMargins(0, 60, 0, 60)
|
setMargins(0, 40, 0, 40)
|
||||||
}
|
}
|
||||||
setOnTouchListener { _, event ->
|
setOnTouchListener { _, event ->
|
||||||
if (event.action == MotionEvent.ACTION_UP) {
|
if (event.action == MotionEvent.ACTION_UP) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user