2020-08-24 17:47:57 +02:00
|
|
|
package pl.jakubweg;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
2020-10-15 18:53:00 +03:00
|
|
|
import static fi.vanced.libraries.youtube.sponsors.player.ui.SponsorBlockView.hideNewSegmentLayout;
|
|
|
|
import static fi.vanced.libraries.youtube.sponsors.player.ui.SponsorBlockView.showNewSegmentLayout;
|
2020-08-24 17:47:57 +02:00
|
|
|
|
2020-10-15 18:53:00 +03:00
|
|
|
public class NewSegmentHelperLayout {
|
|
|
|
public static Context context;
|
2020-08-24 17:47:57 +02:00
|
|
|
private static boolean isShown = false;
|
|
|
|
|
|
|
|
public static void show() {
|
|
|
|
if (isShown) return;
|
|
|
|
isShown = true;
|
2020-10-15 18:53:00 +03:00
|
|
|
showNewSegmentLayout();
|
2020-08-24 17:47:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public static void hide() {
|
|
|
|
if (!isShown) return;
|
|
|
|
isShown = false;
|
2020-10-15 18:53:00 +03:00
|
|
|
hideNewSegmentLayout();
|
2020-08-24 17:47:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public static void toggle() {
|
|
|
|
if (isShown) hide();
|
|
|
|
else show();
|
|
|
|
}
|
|
|
|
}
|