package ctbrec.ui.sites.jasmin;

import ctbrec.sites.jasmin.LiveJasmin;
import ctbrec.ui.tabs.FollowedTab;
import javafx.scene.Scene;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;

public class LiveJasminFollowedTab extends LiveJasminTab implements FollowedTab {

    public LiveJasminFollowedTab(LiveJasmin liveJasmin) {
        super("Followed", new LiveJasminFollowedUpdateService(liveJasmin), liveJasmin);
    }

    @Override
    public void setScene(Scene scene) {
        scene.addEventFilter(KeyEvent.KEY_PRESSED, event -> {
            if(this.isSelected()) {
                if(event.getCode() == KeyCode.DELETE) {
                    follow(selectedThumbCells, false);
                }
            }
        });
    }
}
