Skip to content

Commit

Permalink
- code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
derreisende77 committed Oct 26, 2024
1 parent 5292e05 commit 72d2e41
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/main/java/mediathek/gui/tabs/tab_film/GuiFilme.java
Original file line number Diff line number Diff line change
Expand Up @@ -696,9 +696,9 @@ private void setupActionListeners() {
filmLengthSlider.lowValueChangingProperty().addListener(reloadTableListener2);
filmLengthSlider.highValueChangingProperty().addListener(reloadTableListener2);

filterActionPanel.zeitraumProperty().addListener((observable, oldValue, newValue) -> zeitraumTransition.playFromStart());
filterActionPanel.zeitraumProperty().addListener((_, _, _) -> zeitraumTransition.playFromStart());

filterActionPanel.getViewSettingsPane().themaComboBox.setOnAction(evt -> {
filterActionPanel.getViewSettingsPane().themaComboBox.setOnAction(_ -> {
if (!filterActionPanel.getViewSettingsPane().themaComboBox.getItems().isEmpty()) {
reloadTableDataTransition.playFromStart();
}
Expand Down
40 changes: 20 additions & 20 deletions src/main/java/mediathek/javafx/filterpanel/FilterActionPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public BooleanProperty showNewOnlyProperty() {

private void setupAddNewFilterButton() {
viewSettingsPane.setAddNewFilterButtonEventHandler(
event -> {
_ -> {
FilterDTO newFilter =
new FilterDTO(
UUID.randomUUID(), String.format("Filter %d", availableFilters.size() + 1));
Expand All @@ -197,7 +197,7 @@ private void setupDeleteCurrentFilterButton() {
}

viewSettingsPane.btnDeleteCurrentFilter.setOnAction(
event -> {
_ -> {
FilterDTO filterToDelete = filterConfig.getCurrentFilter();
filterConfig.deleteFilter(filterToDelete);

Expand All @@ -221,7 +221,7 @@ private void setupFilterSelection() {
});

viewSettingsPane.setFilterSelectionChangeListener(
(observableValue, oldValue, newValue) -> {
(_, oldValue, newValue) -> {
if (newValue != null && !newValue.equals(oldValue)) {
filterConfig.setCurrentFilter(newValue);
}
Expand Down Expand Up @@ -254,7 +254,7 @@ private FilterDTO renameCurrentFilter(String newValue) {
}

private void setupDeleteFilterButton() {
viewSettingsPane.btnDeleteFilterSettings.setOnAction(e -> {
viewSettingsPane.btnDeleteFilterSettings.setOnAction(_ -> {
viewSettingsPane.senderCheckList.getCheckModel().clearChecks();

filterConfig.clearCurrentFilter();
Expand All @@ -263,7 +263,7 @@ private void setupDeleteFilterButton() {
}

private void setupRenameFilterButton() {
viewSettingsPane.btnRenameFilter.setOnAction(e -> {
viewSettingsPane.btnRenameFilter.setOnAction(_ -> {
final var fltName = filterConfig.getCurrentFilter().name();
SwingUtilities.invokeLater(() -> {
String s = (String)JOptionPane.showInputDialog(
Expand Down Expand Up @@ -311,7 +311,7 @@ private void setupViewSettingsPane() {

setupThemaComboBox();
viewSettingsPane.senderCheckList.getCheckModel().getCheckedItems().
addListener((ListChangeListener<String>) c -> updateThemaComboBox());
addListener((ListChangeListener<String>) _ -> updateThemaComboBox());

filmLengthSlider = viewSettingsPane.filmLengthSliderNode._filmLengthSlider;

Expand Down Expand Up @@ -378,35 +378,35 @@ private void restoreConfigSettings() {

private void setupConfigListeners() {
showOnlyHighQuality.addListener(
(observable, oldValue, newValue) -> filterConfig.setShowHdOnly(newValue));
(_, _, newValue) -> filterConfig.setShowHdOnly(newValue));
showSubtitlesOnly.addListener(
((observable, oldValue, newValue) -> filterConfig.setShowSubtitlesOnly(newValue)));
((_, _, newValue) -> filterConfig.setShowSubtitlesOnly(newValue)));
showBookMarkedOnly.addListener(
((observable, oldValue, newValue) -> filterConfig.setShowBookMarkedOnly(newValue)));
((_, _, newValue) -> filterConfig.setShowBookMarkedOnly(newValue)));
showNewOnly.addListener(
((observable, oldValue, newValue) -> filterConfig.setShowNewOnly(newValue)));
((_, _, newValue) -> filterConfig.setShowNewOnly(newValue)));
showUnseenOnly.addListener(
((observable, oldValue, newValue) -> filterConfig.setShowUnseenOnly(newValue)));
((_, _, newValue) -> filterConfig.setShowUnseenOnly(newValue)));
showLivestreamsOnly.addListener(
((observable, oldValue, newValue) -> filterConfig.setShowLivestreamsOnly(newValue)));
((_, _, newValue) -> filterConfig.setShowLivestreamsOnly(newValue)));

dontShowAbos.addListener(
((observable, oldValue, newValue) -> filterConfig.setDontShowAbos(newValue)));
((_, _, newValue) -> filterConfig.setDontShowAbos(newValue)));
dontShowTrailers.addListener(
((observable, oldValue, newValue) -> filterConfig.setDontShowTrailers(newValue)));
((_, _, newValue) -> filterConfig.setDontShowTrailers(newValue)));
dontShowSignLanguage.addListener(
((observable, oldValue, newValue) -> filterConfig.setDontShowSignLanguage(newValue)));
((_, _, newValue) -> filterConfig.setDontShowSignLanguage(newValue)));
dontShowAudioVersions.addListener(
((observable, oldValue, newValue) -> filterConfig.setDontShowAudioVersions(newValue)));
((_, _, newValue) -> filterConfig.setDontShowAudioVersions(newValue)));
dontShowDuplicates.addListener(
((observable, oldValue, newValue) -> filterConfig.setDontShowDuplicates(newValue)));
((_, _, newValue) -> filterConfig.setDontShowDuplicates(newValue)));

filmLengthSlider.lowValueProperty().addListener(
((observable, oldValue, newValue) -> filterConfig.setFilmLengthMin(newValue.doubleValue())));
((_, _, newValue) -> filterConfig.setFilmLengthMin(newValue.doubleValue())));
filmLengthSlider.highValueProperty().addListener(
((observable, oldValue, newValue) -> filterConfig.setFilmLengthMax(newValue.doubleValue())));
((_, _, newValue) -> filterConfig.setFilmLengthMax(newValue.doubleValue())));

zeitraumProperty.addListener(((os, oV, newValue) -> filterConfig.setZeitraum(newValue)));
zeitraumProperty.addListener(((_, _, newValue) -> filterConfig.setZeitraum(newValue)));
}

/**
Expand Down

0 comments on commit 72d2e41

Please sign in to comment.