fix(Instagram): Update share link fingerprints and navigation patches for 421.x.x
- Fix `Sanitize sharing links` patch: replace deprecated `permalink` string with `create_highlight_permalink_share_url` in permalinkResponseJsonParserMethodMatch - Add error handling in EditShareLinksPatch to gracefully handle fingerprint mismatches - Fix `Hide navigation buttons` patch: use mutable ArrayList and setAccessible(true) to avoid UnsupportedOperationException on newer builds - Update compatibleWith version to 421.0.0.51.66
This commit is contained in:
parent
b632d0f042
commit
480fd00b4c
4 changed files with 21 additions and 17 deletions
|
|
@ -19,15 +19,18 @@ public class HideNavigationButtonsPatch {
|
|||
String enumNameField
|
||||
)
|
||||
throws IllegalAccessException, NoSuchFieldException {
|
||||
for (Object button : navigationButtonsList) {
|
||||
List<Object> mutableList = new java.util.ArrayList<>(navigationButtonsList);
|
||||
for (int i = 0; i < mutableList.size(); i++) {
|
||||
Object button = mutableList.get(i);
|
||||
Field f = button.getClass().getDeclaredField(enumNameField);
|
||||
f.setAccessible(true);
|
||||
String currentButtonEnumName = (String) f.get(button);
|
||||
|
||||
if (buttonNameToRemove.equals(currentButtonEnumName)) {
|
||||
navigationButtonsList.remove(button);
|
||||
mutableList.remove(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return navigationButtonsList;
|
||||
return mutableList;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue