Add SB bold icon placeholder code
This commit is contained in:
parent
f2356a8be2
commit
f30ece9287
4 changed files with 50 additions and 10 deletions
|
|
@ -1,16 +1,27 @@
|
|||
package app.revanced.extension.youtube.sponsorblock.ui;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import app.revanced.extension.shared.Logger;
|
||||
import app.revanced.extension.shared.ResourceType;
|
||||
import app.revanced.extension.shared.Utils;
|
||||
import app.revanced.extension.shared.settings.BaseSettings;
|
||||
import app.revanced.extension.youtube.settings.Settings;
|
||||
import app.revanced.extension.youtube.sponsorblock.SegmentPlaybackController;
|
||||
import app.revanced.extension.youtube.videoplayer.PlayerControlButton;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class CreateSegmentButton {
|
||||
|
||||
private static final int DRAWABLE_SB_LOGO = Utils.getResourceIdentifierOrThrow(
|
||||
ResourceType.DRAWABLE, BaseSettings.SETTINGS_DISABLE_BOLD_ICONS.get()
|
||||
? "revanced_sb_logo"
|
||||
: "revanced_sb_logo_bold"
|
||||
);
|
||||
|
||||
@Nullable
|
||||
private static PlayerControlButton instance;
|
||||
|
||||
|
|
@ -31,6 +42,14 @@ public class CreateSegmentButton {
|
|||
v -> SponsorBlockViewController.toggleNewSegmentLayoutVisibility(),
|
||||
null
|
||||
);
|
||||
|
||||
// FIXME: Bold YT player icons are currently forced off.
|
||||
// Enable this logic when the new player icons are not forced off.
|
||||
ImageView icon = Utils.getChildViewByResourceName(controlsView,
|
||||
"revanced_sb_create_segment_button");
|
||||
if (false) {
|
||||
icon.setImageResource(DRAWABLE_SB_LOGO);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Logger.printException(() -> "initialize failure", ex);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue