discord-jadx/app/src/main/java/com/discord/widgets/user/profile/UserProfileHeaderView$updat...

40 lines
1.8 KiB
Java

package com.discord.widgets.user.profile;
import android.graphics.Bitmap;
import com.discord.models.member.GuildMember;
import com.discord.utilities.colors.RepresentativeColorsKt;
import com.discord.widgets.user.profile.UserProfileHeaderViewModel;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: UserProfileHeaderView.kt */
public final class UserProfileHeaderView$updateViewState$1 extends o implements Function1<Bitmap, Unit> {
public final /* synthetic */ UserProfileHeaderViewModel.ViewState.Loaded $viewState;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public UserProfileHeaderView$updateViewState$1(UserProfileHeaderViewModel.ViewState.Loaded loaded) {
super(1);
this.$viewState = loaded;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Bitmap bitmap) {
invoke(bitmap);
return Unit.a;
}
public final void invoke(Bitmap bitmap) {
m.checkNotNullParameter(bitmap, "bitmap");
GuildMember guildMember = this.$viewState.getGuildMember();
if (guildMember == null || !guildMember.hasAvatar()) {
RepresentativeColorsKt.getUserRepresentativeColors().handleBitmap(Long.valueOf(this.$viewState.getUser().getId()), bitmap);
} else {
RepresentativeColorsKt.getGuildMemberRepresentativeColors().handleBitmap(new Pair<>(Long.valueOf(guildMember.getGuildId()), Long.valueOf(guildMember.getUserId())), bitmap);
}
}
}