51 lines
2.1 KiB
Java
51 lines
2.1 KiB
Java
package com.discord.widgets.directories;
|
|
|
|
import android.content.Context;
|
|
import c.a.d.j;
|
|
import com.discord.models.guild.Guild;
|
|
import com.discord.models.member.GuildMember;
|
|
import com.discord.stores.StoreStream;
|
|
import com.discord.widgets.hubs.HubAddNameArgs;
|
|
import com.discord.widgets.hubs.WidgetHubAddName;
|
|
import d0.g0.t;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: WidgetDirectoryChannel.kt */
|
|
public final class WidgetDirectoryChannel$onViewBound$5 extends o implements Function1<Long, Unit> {
|
|
public final /* synthetic */ WidgetDirectoryChannel this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public WidgetDirectoryChannel$onViewBound$5(WidgetDirectoryChannel widgetDirectoryChannel) {
|
|
super(1);
|
|
this.this$0 = widgetDirectoryChannel;
|
|
}
|
|
|
|
/* 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(Long l) {
|
|
invoke(l.longValue());
|
|
return Unit.a;
|
|
}
|
|
|
|
public final void invoke(long j) {
|
|
Context context;
|
|
StoreStream.Companion companion = StoreStream.Companion;
|
|
long selectedGuildId = companion.getGuildSelected().getSelectedGuildId();
|
|
GuildMember member = companion.getGuilds().getMember(selectedGuildId, companion.getUsers().getMe().getId());
|
|
String nick = member != null ? member.getNick() : null;
|
|
if (nick == null) {
|
|
nick = "";
|
|
}
|
|
Guild guild = companion.getGuilds().getGuild(selectedGuildId);
|
|
if (guild != null && (context = this.this$0.getContext()) != null) {
|
|
m.checkNotNullExpressionValue(context, "context ?: return@appSubscribe");
|
|
if (selectedGuildId == j && guild.isHub() && t.isBlank(nick) && !companion.getDirectories().getAndSetSeenNamePrompt(selectedGuildId)) {
|
|
j.d(context, WidgetHubAddName.class, new HubAddNameArgs(guild.getId()));
|
|
}
|
|
}
|
|
}
|
|
}
|