discord-jadx/app/src/main/java/com/discord/widgets/voice/fullscreen/WidgetCallFullscreen$initia...

40 lines
2.3 KiB
Java

package com.discord.widgets.voice.fullscreen;
import android.content.res.Resources;
import android.view.View;
import android.view.ViewGroup;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.view.OnApplyWindowInsetsListener;
import androidx.core.view.WindowInsetsCompat;
import com.discord.utilities.dimen.DimenUtils;
import com.discord.widgets.voice.fullscreen.WidgetCallFullscreen;
import d0.z.d.m;
import java.util.Objects;
/* compiled from: WidgetCallFullscreen.kt */
public final class WidgetCallFullscreen$initializeSystemUiListeners$3 implements OnApplyWindowInsetsListener {
public final /* synthetic */ WidgetCallFullscreen this$0;
public WidgetCallFullscreen$initializeSystemUiListeners$3(WidgetCallFullscreen widgetCallFullscreen) {
this.this$0 = widgetCallFullscreen;
}
@Override // androidx.core.view.OnApplyWindowInsetsListener
public final WindowInsetsCompat onApplyWindowInsets(View view, WindowInsetsCompat windowInsetsCompat) {
m.checkNotNullExpressionValue(view, "view");
ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
Objects.requireNonNull(layoutParams, "null cannot be cast to non-null type androidx.constraintlayout.widget.ConstraintLayout.LayoutParams");
ConstraintLayout.LayoutParams layoutParams2 = (ConstraintLayout.LayoutParams) layoutParams;
WidgetCallFullscreen.Companion companion = WidgetCallFullscreen.Companion;
Resources resources = this.this$0.getResources();
m.checkNotNullExpressionValue(resources, "resources");
((ViewGroup.MarginLayoutParams) layoutParams2).leftMargin = DimenUtils.dpToPixels(WidgetCallFullscreen.Companion.access$getUnreadIndicatorMarginLeftDp(companion, resources));
m.checkNotNullExpressionValue(windowInsetsCompat, "insets");
int systemWindowInsetTop = windowInsetsCompat.getSystemWindowInsetTop();
Resources resources2 = this.this$0.getResources();
m.checkNotNullExpressionValue(resources2, "resources");
((ViewGroup.MarginLayoutParams) layoutParams2).topMargin = DimenUtils.dpToPixels(WidgetCallFullscreen.Companion.access$getUnreadIndicatorMarginDp(companion, resources2)) + systemWindowInsetTop;
view.setLayoutParams(layoutParams2);
return windowInsetsCompat;
}
}