mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-06-02 19:36:30 +02:00
refactor: No functional changes
This commit is contained in:
parent
a54c064a32
commit
9937185f87
|
@ -197,13 +197,13 @@ final class KeywordContentFilter extends Filter {
|
|||
return false;
|
||||
}
|
||||
logNavigationState("Player active");
|
||||
} else if (NavigationButton.HOME.isActive()) {
|
||||
} else if (NavigationButton.HOME.isSelected()) {
|
||||
// Could use a Switch statement, but there is only 2 tabs of interest.
|
||||
if (!Settings.HIDE_KEYWORD_CONTENT_HOME.get()) {
|
||||
return false;
|
||||
}
|
||||
logNavigationState("Home tab");
|
||||
} else if (NavigationButton.SUBSCRIPTIONS.isActive()) {
|
||||
} else if (NavigationButton.SUBSCRIPTIONS.isSelected()) {
|
||||
if (!Settings.HIDE_KEYWORD_CONTENT_HOME.get()) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ public final class NavigationBar {
|
|||
/**
|
||||
* Create new video tab.
|
||||
*
|
||||
* {@link #isActive()} always returns false, even if the create video UI is on screen.
|
||||
* {@link #isSelected()} always returns false, even if the create video UI is on screen.
|
||||
*/
|
||||
CREATE("CREATION_TAB_LARGE"),
|
||||
SUBSCRIPTIONS("PIVOT_SUBSCRIPTIONS"),
|
||||
|
@ -117,12 +117,12 @@ public final class NavigationBar {
|
|||
VIDEO_LIBRARY("VIDEO_LIBRARY_WHITE");
|
||||
|
||||
/**
|
||||
* @return The active navigation tab. If the library tab is active this returns NULL.
|
||||
* @return The active navigation tab. If the library tab is selected this returns NULL.
|
||||
*/
|
||||
@Nullable
|
||||
public static NavigationButton getActiveNavigationButton() {
|
||||
for (NavigationButton button : values()) {
|
||||
if (button.isActive()) return button;
|
||||
if (button.isSelected()) return button;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ public final class NavigationBar {
|
|||
this.ytEnumName = ytEnumName;
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
public boolean isSelected() {
|
||||
ImageView view = imageViewRef.get();
|
||||
return view != null && view.isSelected();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user