From 9583d67bf1da3c9abb1f35a1000d1186ab07a154 Mon Sep 17 00:00:00 2001 From: rhunk <101876869+rhunk@users.noreply.github.com> Date: Sun, 10 Dec 2023 10:56:48 +0100 Subject: [PATCH] fix(core/ui_tweaks): suggested friend story blank --- .../snapenhance/core/features/impl/ui/UITweaks.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/ui/UITweaks.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/ui/UITweaks.kt index bbfb16b4..1f0ed9cc 100644 --- a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/ui/UITweaks.kt +++ b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/ui/UITweaks.kt @@ -5,6 +5,7 @@ import android.content.Context import android.content.res.Resources import android.text.SpannableString import android.view.View +import android.view.ViewGroup import android.view.ViewGroup.MarginLayoutParams import android.widget.FrameLayout import me.rhunk.snapenhance.common.util.ktx.findFieldsToString @@ -81,7 +82,15 @@ class UITweaks : Feature("UITweaks", loadParams = FeatureLoadParams.ACTIVITY_CRE value.contains("FriendStoryData") }.firstOrNull()?.get(event.prevModel) ?: return@subscribe - event.view.visibility = if (friendStoryData.toString().contains("isFriendOfFriend=true")) View.GONE else View.VISIBLE + event.view.layoutParams.apply { + if (friendStoryData.toString().contains("isFriendOfFriend=true")) { + width = 0 + height = 0 + } else { + width = ViewGroup.LayoutParams.WRAP_CONTENT + height = ViewGroup.LayoutParams.WRAP_CONTENT + } + } } context.event.subscribe(AddViewEvent::class) { event ->