Skip to content

Commit

Permalink
fix(YouTube Music - Remove upgrade button): Remove the correct naviga…
Browse files Browse the repository at this point in the history
…tion bar item

A new item has been added to the list, so the index has to be shifted by one. This is not a final solution and the last index should be removed dynamically
  • Loading branch information
oSumAtrIX committed Aug 19, 2023
1 parent 597e151 commit fd3813f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c


@Patch
@Name("Upgrade button remover")
@Name("Remove upgrade button")
@Description("Removes the upgrade tab from the pivot bar.")
@MusicCompatibility
class RemoveUpgradeButtonPatch : BytecodePatch(
Expand All @@ -36,7 +36,7 @@ class RemoveUpgradeButtonPatch : BytecodePatch(
val instructionList = """
invoke-interface { v0 }, Ljava/util/List;->size()I
move-result v1
const/4 v2, 0x3
const/4 v2, 0x4
invoke-interface {v0, v2}, Ljava/util/List;->remove(I)Ljava/lang/Object;
iput-object v0, v$register, $pivotBarElementFieldRef
""".toInstructions().toMutableList()
Expand Down

0 comments on commit fd3813f

Please sign in to comment.