Skip to content

Commit 080a226

Browse files
author
LisoUseInAIKyrios
committed
fix(Instagram - Hide navigation buttons): Resolve app startup crash
1 parent 2b71bd8 commit 080a226

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

patches/src/main/kotlin/app/revanced/patches/instagram/hide/navigation/HideNavigationButtons.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package app.revanced.patches.instagram.hide.navigation
33
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
44
import app.revanced.patcher.patch.booleanOption
55
import app.revanced.patcher.patch.bytecodePatch
6+
import app.revanced.patches.instagram.misc.extension.sharedExtensionPatch
67
import app.revanced.util.addInstructionsAtControlFlowLabel
78
import app.revanced.util.findFreeRegister
89
import app.revanced.util.getReference
@@ -24,6 +25,8 @@ val hideNavigationButtonsPatch = bytecodePatch(
2425
) {
2526
compatibleWith("com.instagram.android")
2627

28+
dependsOn(sharedExtensionPatch)
29+
2730
val hideReels by booleanOption(
2831
key = "hideReels",
2932
default = true,
@@ -69,20 +72,22 @@ val hideNavigationButtonsPatch = bytecodePatch(
6972
const-string v$freeRegister2, "$enumNameField"
7073
invoke-static { v$buttonsListRegister, v$freeRegister, v$freeRegister2 }, $EXTENSION_CLASS_DESCRIPTOR->removeNavigationButtonByName(Ljava/util/List;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;
7174
move-result-object v$buttonsListRegister
72-
"""
75+
"""
7376
}
7477

75-
if (hideReels!!)
78+
if (hideReels!!) {
7679
addInstructionsAtControlFlowLabel(
7780
returnIndex,
7881
instructionsRemoveButtonByName("fragment_clips")
7982
)
83+
}
8084

81-
if (hideCreate!!)
85+
if (hideCreate!!) {
8286
addInstructionsAtControlFlowLabel(
8387
returnIndex,
8488
instructionsRemoveButtonByName("fragment_share")
8589
)
90+
}
8691
}
8792
}
8893
}

0 commit comments

Comments
 (0)