refactor: No functional changes

This commit is contained in:
LisoUseInAIKyrios 2024-03-19 18:04:32 +04:00
parent a54c064a32
commit 9937185f87
2 changed files with 6 additions and 6 deletions

View File

@ -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;
}

View File

@ -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();
}