Skip to content

Commit

Permalink
fix: GalleryBgHook on QQ 9.0.56+
Browse files Browse the repository at this point in the history
Closes #1279
  • Loading branch information
HdShare committed Dec 22, 2024
1 parent 79e2211 commit 2156e0a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/src/main/java/cc/ioctl/hook/chat/GalleryBgHook.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
import io.github.qauxv.base.annotation.UiItemAgentEntry;
import io.github.qauxv.dsl.FunctionEntryRouter.Locations.Simplify;
import io.github.qauxv.hook.CommonSwitchFunctionHook;
import io.github.qauxv.util.HostInfo;
import io.github.qauxv.util.Initiator;
import io.github.qauxv.util.QQVersion;
import io.github.qauxv.util.SyncUtils;
import io.github.qauxv.util.dexkit.CAbsGalScene;
import io.github.qauxv.util.dexkit.CGalleryBaseScene;
Expand All @@ -59,7 +61,9 @@ public boolean initOnce() throws Exception {
if (kRFWLayerAnimPart != null) {
Method m = kRFWLayerAnimPart.getDeclaredMethod("initStartAnim", ImageView.class);
HookUtils.hookAfterIfEnabled(this, m, param -> {
Object mDragLayout = Reflex.getInstanceObject(param.thisObject, "mDragLayout", null);
Object mDragLayout = Reflex.getInstanceObject(param.thisObject,
HostInfo.requireMinQQVersion(QQVersion.QQ_9_0_56) ? "dragLayout" : "mDragLayout",
null);
Reflex.setInstanceObject(mDragLayout, "mWindowBgDrawable", new ColorDrawable(Color.TRANSPARENT));
});
Method m2 = kRFWLayerAnimPart.getDeclaredMethod("updateBackgroundAlpha", int.class);
Expand Down

0 comments on commit 2156e0a

Please sign in to comment.