package xyz.netfly.ui.live.epg;

import android.view.View;
import androidx.recyclerview.widget.q1;
import ie.l5;
import xyz.stream.view.RecyclerWithPositionView;

/* JADX INFO: loaded from: classes3.dex */
public final /* synthetic */ class c implements Runnable {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f35338a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ EPGView f35339b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ int f35340c;

    public /* synthetic */ c(EPGView ePGView, int i10, int i11) {
        this.f35338a = i11;
        this.f35339b = ePGView;
        this.f35340c = i10;
    }

    @Override // java.lang.Runnable
    public final void run() {
        int i10 = this.f35338a;
        int i11 = this.f35340c;
        EPGView ePGView = this.f35339b;
        switch (i10) {
            case 0:
                if (!ePGView.S.isEmpty()) {
                    int iMax = Math.max(0, Math.min(i11, r0.size() - 1));
                    ePGView.f35331q0 = iMax;
                    l5 l5Var = ePGView.R;
                    q1 layoutManager = l5Var.f27183b.getLayoutManager();
                    RecyclerWithPositionView recyclerWithPositionView = l5Var.f27183b;
                    if (layoutManager != null) {
                        View viewFindViewByPosition = recyclerWithPositionView.getLayoutManager().findViewByPosition(iMax);
                        if (viewFindViewByPosition == null) {
                            recyclerWithPositionView.setSelection(iMax);
                        } else {
                            viewFindViewByPosition.requestFocus();
                        }
                    } else {
                        recyclerWithPositionView.setSelection(iMax);
                    }
                    break;
                }
                break;
            default:
                l5 l5Var2 = ePGView.R;
                ePGView.k(l5Var2.f27183b, i11);
                ePGView.k(l5Var2.f27184c, i11);
                break;
        }
    }
}
