fix(Spotify): Prevent hiding all navigation bar buttons (#5122)
This commit is contained in:
@ -37,6 +37,11 @@ public final class HideCreateButtonPatch {
|
|||||||
String matchedTitleResId = null;
|
String matchedTitleResId = null;
|
||||||
|
|
||||||
for (String titleResId : CREATE_BUTTON_TITLE_RES_ID_LIST) {
|
for (String titleResId : CREATE_BUTTON_TITLE_RES_ID_LIST) {
|
||||||
|
// In case the resource id has not been found.
|
||||||
|
if (titleResId.equals("0")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (stringifiedNavigationBarItem.contains(titleResId)) {
|
if (stringifiedNavigationBarItem.contains(titleResId)) {
|
||||||
isCreateButton = true;
|
isCreateButton = true;
|
||||||
matchedTitleResId = titleResId;
|
matchedTitleResId = titleResId;
|
||||||
@ -58,6 +63,11 @@ public final class HideCreateButtonPatch {
|
|||||||
* Create button.
|
* Create button.
|
||||||
*/
|
*/
|
||||||
public static boolean isOldCreateButton(int oldNavigationBarItemTitleResId) {
|
public static boolean isOldCreateButton(int oldNavigationBarItemTitleResId) {
|
||||||
|
// In case the resource id has not been found.
|
||||||
|
if (OLD_CREATE_BUTTON_TITLE_RES_ID == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
boolean isCreateButton = oldNavigationBarItemTitleResId == OLD_CREATE_BUTTON_TITLE_RES_ID;
|
boolean isCreateButton = oldNavigationBarItemTitleResId == OLD_CREATE_BUTTON_TITLE_RES_ID;
|
||||||
|
|
||||||
if (isCreateButton) {
|
if (isCreateButton) {
|
||||||
|
@ -216,6 +216,12 @@ public final class UnlockPremiumPatch {
|
|||||||
|
|
||||||
for (int i = 0; i < stringList.size(); i++) {
|
for (int i = 0; i < stringList.size(); i++) {
|
||||||
String string = stringList.get(i);
|
String string = stringList.get(i);
|
||||||
|
|
||||||
|
// In case the string is a resource id, and it has not been found.
|
||||||
|
if (string.equals("0")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!stringifiedContextMenuItem.contains(string)) {
|
if (!stringifiedContextMenuItem.contains(string)) {
|
||||||
allMatch = false;
|
allMatch = false;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user