chore: Reflecting changes in Kotlin 2.0.21

This commit is contained in:
inotia00 2025-01-17 14:50:38 +09:00
parent c1da308239
commit 316038cd75
2 changed files with 4 additions and 2 deletions

View File

@ -21,6 +21,7 @@ import app.revanced.extension.shared.utils.Utils;
import app.revanced.extension.youtube.settings.Settings; import app.revanced.extension.youtube.settings.Settings;
import app.revanced.extension.youtube.shared.ShortsPlayerState; import app.revanced.extension.youtube.shared.ShortsPlayerState;
import app.revanced.extension.youtube.utils.VideoUtils; import app.revanced.extension.youtube.utils.VideoUtils;
import kotlin.Unit;
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class ShortsPatch { public class ShortsPatch {
@ -34,7 +35,7 @@ public class ShortsPatch {
if (HIDE_SHORTS_NAVIGATION_BAR) { if (HIDE_SHORTS_NAVIGATION_BAR) {
ShortsPlayerState.getOnChange().addObserver((ShortsPlayerState state) -> { ShortsPlayerState.getOnChange().addObserver((ShortsPlayerState state) -> {
setNavigationBarLayoutParams(state); setNavigationBarLayoutParams(state);
return null; return Unit.INSTANCE;
}); });
} }
final int bottomMargin = validateValue( final int bottomMargin = validateValue(

View File

@ -23,6 +23,7 @@ import app.revanced.extension.youtube.patches.player.PlayerPatch;
import app.revanced.extension.youtube.settings.Settings; import app.revanced.extension.youtube.settings.Settings;
import app.revanced.extension.youtube.shared.PlayerType; import app.revanced.extension.youtube.shared.PlayerType;
import app.revanced.extension.youtube.sponsorblock.objects.SponsorSegment; import app.revanced.extension.youtube.sponsorblock.objects.SponsorSegment;
import kotlin.Unit;
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class SponsorBlockViewController { public class SponsorBlockViewController {
@ -44,7 +45,7 @@ public class SponsorBlockViewController {
static { static {
PlayerType.getOnChange().addObserver((PlayerType type) -> { PlayerType.getOnChange().addObserver((PlayerType type) -> {
playerTypeChanged(type); playerTypeChanged(type);
return null; return Unit.INSTANCE;
}); });
defaultBottomMargin = getDimension("brand_interaction_default_bottom_margin"); defaultBottomMargin = getDimension("brand_interaction_default_bottom_margin");