package com.discord.widgets.directories; import android.content.Context; import b.a.d.j; import com.discord.models.guild.Guild; import com.discord.models.member.GuildMember; import com.discord.stores.StoreStream; import com.discord.utilities.features.GrowthTeamFeatures; 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$initializeUI$5 extends o implements Function1 { public final /* synthetic */ WidgetDirectoryChannel this$0; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public WidgetDirectoryChannel$initializeUI$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) { Guild guild; Context context; StoreStream.Companion companion = StoreStream.Companion; long selectedGuildId = companion.getGuildSelected().getSelectedGuildId(); GuildMember member = companion.getGuilds().getMember(selectedGuildId, companion.getUsers().getMe().getId()); if (member != null && (guild = companion.getGuilds().getGuild(selectedGuildId)) != null && (context = this.this$0.getContext()) != null) { m.checkNotNullExpressionValue(context, "context ?: return@appSubscribe"); if (this.this$0.isVisible() && selectedGuildId == j && guild.isHub()) { String nick = member.getNick(); if ((nick == null || t.isBlank(nick)) && !companion.getDirectories().getAndSetSeenNamePrompt(selectedGuildId) && !GrowthTeamFeatures.INSTANCE.isHubNameKillSwitchEnabled()) { j.d(context, WidgetHubAddName.class, new HubAddNameArgs(guild.getId())); } } } } }