Skip to content
This repository was archived by the owner on Dec 11, 2024. It is now read-only.

Commit

Permalink
fix(YouTube - Toolbar components): Turning on the `Hide voice search …
Browse files Browse the repository at this point in the history
…button` setting makes the margin of the searchbar 0
  • Loading branch information
inotia00 authored and anddea committed Jul 29, 2024
1 parent f728307 commit 26a4aa9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import static app.revanced.integrations.shared.utils.Utils.hideViewByLayoutParams;
import static app.revanced.integrations.shared.utils.Utils.hideViewGroupByMarginLayoutParams;
import static app.revanced.integrations.shared.utils.Utils.hideViewUnderCondition;
import static app.revanced.integrations.youtube.patches.utils.PatchStatus.ImageSearchButton;
import static app.revanced.integrations.youtube.shared.NavigationBar.NavigationButton;

import android.app.Activity;
Expand Down Expand Up @@ -537,7 +538,7 @@ public static boolean hideSearchTermThumbnail() {
* <p>
* In this case, {@link Utils#hideViewByLayoutParams(View)} should be used.
*/
private static final boolean showImageSearchButtonAndHideVoiceSearchButton = !hideImageSearchButton && hideVoiceSearchButton;
private static final boolean showImageSearchButtonAndHideVoiceSearchButton = !hideImageSearchButton && hideVoiceSearchButton && ImageSearchButton();

public static boolean hideImageSearchButton(boolean original) {
return !hideImageSearchButton && original;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

public class PatchStatus {

public static boolean ImageSearchButton() {
// Replace this with true if the Hide image search buttons patch succeeds
return false;
}

public static boolean PlayerButtons() {
// Replace this with true if the Hide player buttons patch succeeds
return false;
Expand Down

0 comments on commit 26a4aa9

Please sign in to comment.