package app.lsgui.gui.main;

import app.lsgui.utils.Settings;
import javafx.scene.control.ComboBox;

public final class QualityComboBox extends ComboBox<String> {

    private static final String OFFLINEQUALITY = "Channel is offline";

    public QualityComboBox() {
        // Empty Constructor
    }

    public void initialize() {
        getSelectionModel().selectedItemProperty().addListener((obs, oldValue, newValue) -> {
            if (!OFFLINEQUALITY.equals(newValue)) {
                Settings.getInstance().setQuality(newValue);
            }
        });
    }

}

@@ -24,16 +24,77 @@
 ain;%0D%0A%0D%0A
+import org.slf4j.Logger;%0D%0Aimport org.slf4j.LoggerFactory;%0D%0A%0D%0A
 import a
@@ -119,16 +119,16 @@
 tings;%0D%0A
-
 import j
@@ -223,18 +223,106 @@
 ing%3E %7B%0D%0A
+    private static final Logger LOGGER = LoggerFactory.getLogger(QualityComboBox.class);
 %0D%0A
-
     priv
@@ -581,24 +581,24 @@
 alue) -%3E %7B%0D%0A
-
             
@@ -634,24 +634,95 @@
 wValue)) %7B%0D%0A
+                LOGGER.debug(%22Set selected Quality to %7B%7D%22, newValue);%0D%0A
             

add logging