2021-06-27 20:44:35 +00:00
package com.discord.widgets.user.usersheet ;
2021-11-08 18:25:28 +00:00
import a0.a.a.b ;
2021-06-27 20:44:35 +00:00
import android.content.Context ;
import androidx.annotation.MainThread ;
import androidx.annotation.StringRes ;
2021-12-21 23:37:30 +00:00
import b.d.b.a.a ;
2021-08-09 22:50:01 +00:00
import com.discord.R ;
2021-06-27 20:44:35 +00:00
import com.discord.api.channel.Channel ;
2021-10-19 23:48:27 +00:00
import com.discord.api.channel.ChannelUtils ;
2021-11-23 19:35:19 +00:00
import com.discord.api.connectedaccounts.ConnectedAccount ;
2021-08-09 22:50:01 +00:00
import com.discord.api.permission.Permission ;
2021-06-27 20:44:35 +00:00
import com.discord.api.role.GuildRole ;
2021-11-23 19:35:19 +00:00
import com.discord.api.user.UserProfile ;
2021-06-27 20:44:35 +00:00
import com.discord.api.voice.state.StageRequestToSpeakState ;
import com.discord.api.voice.state.VoiceState ;
import com.discord.app.AppViewModel ;
import com.discord.models.domain.ModelApplicationStream ;
2021-07-09 21:07:36 +00:00
import com.discord.models.domain.ModelUserNote ;
2021-06-27 20:44:35 +00:00
import com.discord.models.domain.ModelUserRelationship ;
import com.discord.models.guild.Guild ;
import com.discord.models.member.GuildMember ;
import com.discord.models.presence.Presence ;
2021-07-13 20:48:29 +00:00
import com.discord.models.user.CoreUser ;
2021-06-27 20:44:35 +00:00
import com.discord.models.user.MeUser ;
import com.discord.models.user.User ;
2021-07-13 20:48:29 +00:00
import com.discord.nullserializable.NullSerializable ;
2021-06-27 20:44:35 +00:00
import com.discord.restapi.RestAPIParams ;
import com.discord.simpleast.core.node.Node ;
import com.discord.simpleast.core.parser.Parser ;
import com.discord.stores.StoreApplicationStreamPreviews ;
import com.discord.stores.StoreApplicationStreaming ;
import com.discord.stores.StoreMediaSettings ;
import com.discord.stores.StoreStream ;
import com.discord.stores.StoreUserNotes ;
2021-07-13 20:48:29 +00:00
import com.discord.stores.StoreUserProfile ;
2021-12-17 22:03:14 +00:00
import com.discord.utilities.dimen.DimenUtils ;
2021-06-27 20:44:35 +00:00
import com.discord.utilities.guilds.RoleUtils ;
2021-07-13 20:48:29 +00:00
import com.discord.utilities.icon.IconUtils ;
2021-06-27 20:44:35 +00:00
import com.discord.utilities.permissions.ManageUserContext ;
2021-08-04 22:02:59 +00:00
import com.discord.utilities.permissions.PermissionUtils ;
2021-06-27 20:44:35 +00:00
import com.discord.utilities.rest.RestAPI ;
import com.discord.utilities.rx.ObservableExtensionsKt ;
import com.discord.utilities.streams.StreamContext ;
import com.discord.utilities.textprocessing.DiscordParser ;
import com.discord.utilities.textprocessing.MessageParseState ;
import com.discord.utilities.textprocessing.MessagePreprocessor ;
import com.discord.utilities.textprocessing.MessageRenderContext ;
import com.discord.utilities.textprocessing.node.SpoilerNode ;
import com.discord.utilities.voice.PerceptualVolumeUtils ;
import com.discord.widgets.stage.StageChannelAPI ;
import com.discord.widgets.stage.StageRoles ;
import com.discord.widgets.stage.usersheet.UserProfileStageActionsView ;
import com.discord.widgets.user.presence.ModelRichPresence ;
import com.discord.widgets.user.profile.UserProfileAdminView ;
import com.discord.widgets.user.profile.UserProfileConnectionsView ;
import com.discord.widgets.user.usersheet.UserProfileVoiceSettingsView ;
import com.discord.widgets.user.usersheet.WidgetUserSheet ;
2021-11-08 18:25:28 +00:00
import d0.g0.t ;
import d0.t.n ;
import d0.t.u ;
import d0.z.d.m ;
import d0.z.d.o ;
2021-06-27 20:44:35 +00:00
import java.util.ArrayList ;
import java.util.LinkedHashSet ;
import java.util.List ;
import java.util.Map ;
import java.util.Set ;
import kotlin.Unit ;
import kotlin.jvm.functions.Function0 ;
import kotlin.jvm.functions.Function1 ;
import kotlin.jvm.internal.DefaultConstructorMarker ;
import rx.Observable ;
import rx.subjects.PublishSubject ;
/* compiled from: WidgetUserSheetViewModel.kt */
public final class WidgetUserSheetViewModel extends AppViewModel < ViewState > {
public static final Companion Companion = new Companion ( null ) ;
public static final String LOCATION = " User Profile " ;
private final Parser < MessageRenderContext , Node < MessageRenderContext > , MessageParseState > bioParser ;
private final long channelId ;
private final PublishSubject < Event > eventSubject ;
private Set < String > fetchedPreviews ;
private final String friendToken ;
2021-09-14 19:31:33 +00:00
private final Long guildId ;
2021-06-27 20:44:35 +00:00
private final boolean isVoiceContext ;
private StoreState mostRecentStoreState ;
2021-07-13 20:48:29 +00:00
private boolean openPopoutLogged ;
2021-06-27 20:44:35 +00:00
private final RestAPI restAPI ;
private final RestAPI restAPISerializeNulls ;
private final Set < Integer > revealedBioIndices ;
private final StoreApplicationStreamPreviews storeApplicationStreamPreviews ;
private final StoreApplicationStreaming storeApplicationStreaming ;
private final StoreMediaSettings storeMediaSettings ;
2021-07-09 21:07:36 +00:00
private final StoreUserNotes storeUserNotes ;
2021-11-23 19:35:19 +00:00
private final StoreUserProfile storeUserProfile ;
2021-06-27 20:44:35 +00:00
private final WidgetUserSheet . StreamPreviewClickBehavior streamPreviewClickBehavior ;
private final long userId ;
/* compiled from: WidgetUserSheetViewModel.kt */
/* renamed from: com.discord.widgets.user.usersheet.WidgetUserSheetViewModel$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function1 < StoreState , Unit > {
public final /* synthetic */ WidgetUserSheetViewModel this $0 ;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1 ( WidgetUserSheetViewModel widgetUserSheetViewModel ) {
super ( 1 ) ;
this . this$0 = widgetUserSheetViewModel ;
}
/* 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 ( StoreState storeState ) {
invoke ( storeState ) ;
return Unit . a ;
}
public final void invoke ( StoreState storeState ) {
WidgetUserSheetViewModel . access$handleStoreState ( this . this$0 , storeState ) ;
}
}
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class Companion {
private Companion ( ) {
}
public /* synthetic */ Companion ( DefaultConstructorMarker defaultConstructorMarker ) {
this ( ) ;
}
}
/* compiled from: WidgetUserSheetViewModel.kt */
public static abstract class Event {
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class DismissSheet extends Event {
public static final DismissSheet INSTANCE = new DismissSheet ( ) ;
private DismissSheet ( ) {
super ( null ) ;
}
}
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class LaunchBanUser extends Event {
private final long guildId ;
private final long userId ;
private final String username ;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public LaunchBanUser ( String str , long j , long j2 ) {
super ( null ) ;
m . checkNotNullParameter ( str , " username " ) ;
this . username = str ;
this . guildId = j ;
this . userId = j2 ;
}
public static /* synthetic */ LaunchBanUser copy$default ( LaunchBanUser launchBanUser , String str , long j , long j2 , int i , Object obj ) {
if ( ( i & 1 ) ! = 0 ) {
str = launchBanUser . username ;
}
if ( ( i & 2 ) ! = 0 ) {
j = launchBanUser . guildId ;
}
if ( ( i & 4 ) ! = 0 ) {
j2 = launchBanUser . userId ;
}
return launchBanUser . copy ( str , j , j2 ) ;
}
public final String component1 ( ) {
return this . username ;
}
public final long component2 ( ) {
return this . guildId ;
}
public final long component3 ( ) {
return this . userId ;
}
public final LaunchBanUser copy ( String str , long j , long j2 ) {
m . checkNotNullParameter ( str , " username " ) ;
return new LaunchBanUser ( str , j , j2 ) ;
}
public boolean equals ( Object obj ) {
if ( this = = obj ) {
return true ;
}
if ( ! ( obj instanceof LaunchBanUser ) ) {
return false ;
}
LaunchBanUser launchBanUser = ( LaunchBanUser ) obj ;
return m . areEqual ( this . username , launchBanUser . username ) & & this . guildId = = launchBanUser . guildId & & this . userId = = launchBanUser . userId ;
}
public final long getGuildId ( ) {
return this . guildId ;
}
public final long getUserId ( ) {
return this . userId ;
}
public final String getUsername ( ) {
return this . username ;
}
public int hashCode ( ) {
String str = this . username ;
int hashCode = str ! = null ? str . hashCode ( ) : 0 ;
return b . a ( this . userId ) + ( ( b . a ( this . guildId ) + ( hashCode * 31 ) ) * 31 ) ;
}
public String toString ( ) {
2021-11-08 18:25:28 +00:00
StringBuilder R = a . R ( " LaunchBanUser(username= " ) ;
R . append ( this . username ) ;
R . append ( " , guildId= " ) ;
R . append ( this . guildId ) ;
R . append ( " , userId= " ) ;
return a . B ( R , this . userId , " ) " ) ;
2021-06-27 20:44:35 +00:00
}
}
2021-12-17 22:03:14 +00:00
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class LaunchDisableCommunication extends Event {
private final long guildId ;
private final long userId ;
public LaunchDisableCommunication ( long j , long j2 ) {
super ( null ) ;
this . userId = j ;
this . guildId = j2 ;
}
public static /* synthetic */ LaunchDisableCommunication copy$default ( LaunchDisableCommunication launchDisableCommunication , long j , long j2 , int i , Object obj ) {
if ( ( i & 1 ) ! = 0 ) {
j = launchDisableCommunication . userId ;
}
if ( ( i & 2 ) ! = 0 ) {
j2 = launchDisableCommunication . guildId ;
}
return launchDisableCommunication . copy ( j , j2 ) ;
}
public final long component1 ( ) {
return this . userId ;
}
public final long component2 ( ) {
return this . guildId ;
}
public final LaunchDisableCommunication copy ( long j , long j2 ) {
return new LaunchDisableCommunication ( j , j2 ) ;
}
public boolean equals ( Object obj ) {
if ( this = = obj ) {
return true ;
}
if ( ! ( obj instanceof LaunchDisableCommunication ) ) {
return false ;
}
LaunchDisableCommunication launchDisableCommunication = ( LaunchDisableCommunication ) obj ;
return this . userId = = launchDisableCommunication . userId & & this . guildId = = launchDisableCommunication . guildId ;
}
public final long getGuildId ( ) {
return this . guildId ;
}
public final long getUserId ( ) {
return this . userId ;
}
public int hashCode ( ) {
return b . a ( this . guildId ) + ( b . a ( this . userId ) * 31 ) ;
}
public String toString ( ) {
StringBuilder R = a . R ( " LaunchDisableCommunication(userId= " ) ;
R . append ( this . userId ) ;
R . append ( " , guildId= " ) ;
return a . B ( R , this . guildId , " ) " ) ;
}
}
2021-06-27 20:44:35 +00:00
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class LaunchEditMember extends Event {
private final long guildId ;
private final long userId ;
public LaunchEditMember ( long j , long j2 ) {
super ( null ) ;
this . guildId = j ;
this . userId = j2 ;
}
public static /* synthetic */ LaunchEditMember copy$default ( LaunchEditMember launchEditMember , long j , long j2 , int i , Object obj ) {
if ( ( i & 1 ) ! = 0 ) {
j = launchEditMember . guildId ;
}
if ( ( i & 2 ) ! = 0 ) {
j2 = launchEditMember . userId ;
}
return launchEditMember . copy ( j , j2 ) ;
}
public final long component1 ( ) {
return this . guildId ;
}
public final long component2 ( ) {
return this . userId ;
}
public final LaunchEditMember copy ( long j , long j2 ) {
return new LaunchEditMember ( j , j2 ) ;
}
public boolean equals ( Object obj ) {
if ( this = = obj ) {
return true ;
}
if ( ! ( obj instanceof LaunchEditMember ) ) {
return false ;
}
LaunchEditMember launchEditMember = ( LaunchEditMember ) obj ;
return this . guildId = = launchEditMember . guildId & & this . userId = = launchEditMember . userId ;
}
public final long getGuildId ( ) {
return this . guildId ;
}
public final long getUserId ( ) {
return this . userId ;
}
public int hashCode ( ) {
return b . a ( this . userId ) + ( b . a ( this . guildId ) * 31 ) ;
}
public String toString ( ) {
2021-11-08 18:25:28 +00:00
StringBuilder R = a . R ( " LaunchEditMember(guildId= " ) ;
R . append ( this . guildId ) ;
R . append ( " , userId= " ) ;
return a . B ( R , this . userId , " ) " ) ;
2021-06-27 20:44:35 +00:00
}
}
2021-12-17 22:03:14 +00:00
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class LaunchEnableCommunication extends Event {
private final long guildId ;
private final long userId ;
public LaunchEnableCommunication ( long j , long j2 ) {
super ( null ) ;
this . userId = j ;
this . guildId = j2 ;
}
public static /* synthetic */ LaunchEnableCommunication copy$default ( LaunchEnableCommunication launchEnableCommunication , long j , long j2 , int i , Object obj ) {
if ( ( i & 1 ) ! = 0 ) {
j = launchEnableCommunication . userId ;
}
if ( ( i & 2 ) ! = 0 ) {
j2 = launchEnableCommunication . guildId ;
}
return launchEnableCommunication . copy ( j , j2 ) ;
}
public final long component1 ( ) {
return this . userId ;
}
public final long component2 ( ) {
return this . guildId ;
}
public final LaunchEnableCommunication copy ( long j , long j2 ) {
return new LaunchEnableCommunication ( j , j2 ) ;
}
public boolean equals ( Object obj ) {
if ( this = = obj ) {
return true ;
}
if ( ! ( obj instanceof LaunchEnableCommunication ) ) {
return false ;
}
LaunchEnableCommunication launchEnableCommunication = ( LaunchEnableCommunication ) obj ;
return this . userId = = launchEnableCommunication . userId & & this . guildId = = launchEnableCommunication . guildId ;
}
public final long getGuildId ( ) {
return this . guildId ;
}
public final long getUserId ( ) {
return this . userId ;
}
public int hashCode ( ) {
return b . a ( this . guildId ) + ( b . a ( this . userId ) * 31 ) ;
}
public String toString ( ) {
StringBuilder R = a . R ( " LaunchEnableCommunication(userId= " ) ;
R . append ( this . userId ) ;
R . append ( " , guildId= " ) ;
return a . B ( R , this . guildId , " ) " ) ;
}
}
2021-06-27 20:44:35 +00:00
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class LaunchKickUser extends Event {
private final long guildId ;
private final long userId ;
private final String username ;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public LaunchKickUser ( String str , long j , long j2 ) {
super ( null ) ;
m . checkNotNullParameter ( str , " username " ) ;
this . username = str ;
this . guildId = j ;
this . userId = j2 ;
}
public static /* synthetic */ LaunchKickUser copy$default ( LaunchKickUser launchKickUser , String str , long j , long j2 , int i , Object obj ) {
if ( ( i & 1 ) ! = 0 ) {
str = launchKickUser . username ;
}
if ( ( i & 2 ) ! = 0 ) {
j = launchKickUser . guildId ;
}
if ( ( i & 4 ) ! = 0 ) {
j2 = launchKickUser . userId ;
}
return launchKickUser . copy ( str , j , j2 ) ;
}
public final String component1 ( ) {
return this . username ;
}
public final long component2 ( ) {
return this . guildId ;
}
public final long component3 ( ) {
return this . userId ;
}
public final LaunchKickUser copy ( String str , long j , long j2 ) {
m . checkNotNullParameter ( str , " username " ) ;
return new LaunchKickUser ( str , j , j2 ) ;
}
public boolean equals ( Object obj ) {
if ( this = = obj ) {
return true ;
}
if ( ! ( obj instanceof LaunchKickUser ) ) {
return false ;
}
LaunchKickUser launchKickUser = ( LaunchKickUser ) obj ;
return m . areEqual ( this . username , launchKickUser . username ) & & this . guildId = = launchKickUser . guildId & & this . userId = = launchKickUser . userId ;
}
public final long getGuildId ( ) {
return this . guildId ;
}
public final long getUserId ( ) {
return this . userId ;
}
public final String getUsername ( ) {
return this . username ;
}
public int hashCode ( ) {
String str = this . username ;
int hashCode = str ! = null ? str . hashCode ( ) : 0 ;
return b . a ( this . userId ) + ( ( b . a ( this . guildId ) + ( hashCode * 31 ) ) * 31 ) ;
}
public String toString ( ) {
2021-11-08 18:25:28 +00:00
StringBuilder R = a . R ( " LaunchKickUser(username= " ) ;
R . append ( this . username ) ;
R . append ( " , guildId= " ) ;
R . append ( this . guildId ) ;
R . append ( " , userId= " ) ;
return a . B ( R , this . userId , " ) " ) ;
2021-06-27 20:44:35 +00:00
}
}
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class LaunchMoveUser extends Event {
private final long guildId ;
public LaunchMoveUser ( long j ) {
super ( null ) ;
this . guildId = j ;
}
public static /* synthetic */ LaunchMoveUser copy$default ( LaunchMoveUser launchMoveUser , long j , int i , Object obj ) {
if ( ( i & 1 ) ! = 0 ) {
j = launchMoveUser . guildId ;
}
return launchMoveUser . copy ( j ) ;
}
public final long component1 ( ) {
return this . guildId ;
}
public final LaunchMoveUser copy ( long j ) {
return new LaunchMoveUser ( j ) ;
}
public boolean equals ( Object obj ) {
if ( this ! = obj ) {
return ( obj instanceof LaunchMoveUser ) & & this . guildId = = ( ( LaunchMoveUser ) obj ) . guildId ;
}
return true ;
}
public final long getGuildId ( ) {
return this . guildId ;
}
public int hashCode ( ) {
return b . a ( this . guildId ) ;
}
public String toString ( ) {
2021-11-08 18:25:28 +00:00
return a . B ( a . R ( " LaunchMoveUser(guildId= " ) , this . guildId , " ) " ) ;
2021-06-27 20:44:35 +00:00
}
}
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class LaunchSpectate extends Event {
private final ModelApplicationStream stream ;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public LaunchSpectate ( ModelApplicationStream modelApplicationStream ) {
super ( null ) ;
m . checkNotNullParameter ( modelApplicationStream , " stream " ) ;
this . stream = modelApplicationStream ;
}
public static /* synthetic */ LaunchSpectate copy$default ( LaunchSpectate launchSpectate , ModelApplicationStream modelApplicationStream , int i , Object obj ) {
if ( ( i & 1 ) ! = 0 ) {
modelApplicationStream = launchSpectate . stream ;
}
return launchSpectate . copy ( modelApplicationStream ) ;
}
public final ModelApplicationStream component1 ( ) {
return this . stream ;
}
public final LaunchSpectate copy ( ModelApplicationStream modelApplicationStream ) {
m . checkNotNullParameter ( modelApplicationStream , " stream " ) ;
return new LaunchSpectate ( modelApplicationStream ) ;
}
public boolean equals ( Object obj ) {
if ( this ! = obj ) {
return ( obj instanceof LaunchSpectate ) & & m . areEqual ( this . stream , ( ( LaunchSpectate ) obj ) . stream ) ;
}
return true ;
}
public final ModelApplicationStream getStream ( ) {
return this . stream ;
}
public int hashCode ( ) {
ModelApplicationStream modelApplicationStream = this . stream ;
if ( modelApplicationStream ! = null ) {
return modelApplicationStream . hashCode ( ) ;
}
return 0 ;
}
public String toString ( ) {
2021-11-08 18:25:28 +00:00
StringBuilder R = a . R ( " LaunchSpectate(stream= " ) ;
R . append ( this . stream ) ;
R . append ( " ) " ) ;
return R . toString ( ) ;
2021-06-27 20:44:35 +00:00
}
}
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class LaunchVideoCall extends Event {
private final long channelId ;
public LaunchVideoCall ( long j ) {
super ( null ) ;
this . channelId = j ;
}
public static /* synthetic */ LaunchVideoCall copy$default ( LaunchVideoCall launchVideoCall , long j , int i , Object obj ) {
if ( ( i & 1 ) ! = 0 ) {
j = launchVideoCall . channelId ;
}
return launchVideoCall . copy ( j ) ;
}
public final long component1 ( ) {
return this . channelId ;
}
public final LaunchVideoCall copy ( long j ) {
return new LaunchVideoCall ( j ) ;
}
public boolean equals ( Object obj ) {
if ( this ! = obj ) {
return ( obj instanceof LaunchVideoCall ) & & this . channelId = = ( ( LaunchVideoCall ) obj ) . channelId ;
}
return true ;
}
public final long getChannelId ( ) {
return this . channelId ;
}
public int hashCode ( ) {
return b . a ( this . channelId ) ;
}
public String toString ( ) {
2021-11-08 18:25:28 +00:00
return a . B ( a . R ( " LaunchVideoCall(channelId= " ) , this . channelId , " ) " ) ;
2021-06-27 20:44:35 +00:00
}
}
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class LaunchVoiceCall extends Event {
private final long channelId ;
public LaunchVoiceCall ( long j ) {
super ( null ) ;
this . channelId = j ;
}
public static /* synthetic */ LaunchVoiceCall copy$default ( LaunchVoiceCall launchVoiceCall , long j , int i , Object obj ) {
if ( ( i & 1 ) ! = 0 ) {
j = launchVoiceCall . channelId ;
}
return launchVoiceCall . copy ( j ) ;
}
public final long component1 ( ) {
return this . channelId ;
}
public final LaunchVoiceCall copy ( long j ) {
return new LaunchVoiceCall ( j ) ;
}
public boolean equals ( Object obj ) {
if ( this ! = obj ) {
return ( obj instanceof LaunchVoiceCall ) & & this . channelId = = ( ( LaunchVoiceCall ) obj ) . channelId ;
}
return true ;
}
public final long getChannelId ( ) {
return this . channelId ;
}
public int hashCode ( ) {
return b . a ( this . channelId ) ;
}
public String toString ( ) {
2021-11-08 18:25:28 +00:00
return a . B ( a . R ( " LaunchVoiceCall(channelId= " ) , this . channelId , " ) " ) ;
2021-06-27 20:44:35 +00:00
}
}
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class RequestPermissionsForSpectateStream extends Event {
private final ModelApplicationStream stream ;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public RequestPermissionsForSpectateStream ( ModelApplicationStream modelApplicationStream ) {
super ( null ) ;
m . checkNotNullParameter ( modelApplicationStream , " stream " ) ;
this . stream = modelApplicationStream ;
}
public static /* synthetic */ RequestPermissionsForSpectateStream copy$default ( RequestPermissionsForSpectateStream requestPermissionsForSpectateStream , ModelApplicationStream modelApplicationStream , int i , Object obj ) {
if ( ( i & 1 ) ! = 0 ) {
modelApplicationStream = requestPermissionsForSpectateStream . stream ;
}
return requestPermissionsForSpectateStream . copy ( modelApplicationStream ) ;
}
public final ModelApplicationStream component1 ( ) {
return this . stream ;
}
public final RequestPermissionsForSpectateStream copy ( ModelApplicationStream modelApplicationStream ) {
m . checkNotNullParameter ( modelApplicationStream , " stream " ) ;
return new RequestPermissionsForSpectateStream ( modelApplicationStream ) ;
}
public boolean equals ( Object obj ) {
if ( this ! = obj ) {
return ( obj instanceof RequestPermissionsForSpectateStream ) & & m . areEqual ( this . stream , ( ( RequestPermissionsForSpectateStream ) obj ) . stream ) ;
}
return true ;
}
public final ModelApplicationStream getStream ( ) {
return this . stream ;
}
public int hashCode ( ) {
ModelApplicationStream modelApplicationStream = this . stream ;
if ( modelApplicationStream ! = null ) {
return modelApplicationStream . hashCode ( ) ;
}
return 0 ;
}
public String toString ( ) {
2021-11-08 18:25:28 +00:00
StringBuilder R = a . R ( " RequestPermissionsForSpectateStream(stream= " ) ;
R . append ( this . stream ) ;
R . append ( " ) " ) ;
return R . toString ( ) ;
2021-06-27 20:44:35 +00:00
}
}
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class ShowFriendRequestErrorToast extends Event {
private final int abortCode ;
private final String username ;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public ShowFriendRequestErrorToast ( int i , String str ) {
super ( null ) ;
m . checkNotNullParameter ( str , " username " ) ;
this . abortCode = i ;
this . username = str ;
}
public static /* synthetic */ ShowFriendRequestErrorToast copy$default ( ShowFriendRequestErrorToast showFriendRequestErrorToast , int i , String str , int i2 , Object obj ) {
if ( ( i2 & 1 ) ! = 0 ) {
i = showFriendRequestErrorToast . abortCode ;
}
if ( ( i2 & 2 ) ! = 0 ) {
str = showFriendRequestErrorToast . username ;
}
return showFriendRequestErrorToast . copy ( i , str ) ;
}
public final int component1 ( ) {
return this . abortCode ;
}
public final String component2 ( ) {
return this . username ;
}
public final ShowFriendRequestErrorToast copy ( int i , String str ) {
m . checkNotNullParameter ( str , " username " ) ;
return new ShowFriendRequestErrorToast ( i , str ) ;
}
public boolean equals ( Object obj ) {
if ( this = = obj ) {
return true ;
}
if ( ! ( obj instanceof ShowFriendRequestErrorToast ) ) {
return false ;
}
ShowFriendRequestErrorToast showFriendRequestErrorToast = ( ShowFriendRequestErrorToast ) obj ;
return this . abortCode = = showFriendRequestErrorToast . abortCode & & m . areEqual ( this . username , showFriendRequestErrorToast . username ) ;
}
public final int getAbortCode ( ) {
return this . abortCode ;
}
public final String getUsername ( ) {
return this . username ;
}
public int hashCode ( ) {
int i = this . abortCode * 31 ;
String str = this . username ;
return i + ( str ! = null ? str . hashCode ( ) : 0 ) ;
}
public String toString ( ) {
2021-11-08 18:25:28 +00:00
StringBuilder R = a . R ( " ShowFriendRequestErrorToast(abortCode= " ) ;
R . append ( this . abortCode ) ;
R . append ( " , username= " ) ;
return a . H ( R , this . username , " ) " ) ;
2021-06-27 20:44:35 +00:00
}
}
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class ShowToast extends Event {
private final int stringRes ;
public ShowToast ( int i ) {
super ( null ) ;
this . stringRes = i ;
}
public static /* synthetic */ ShowToast copy$default ( ShowToast showToast , int i , int i2 , Object obj ) {
if ( ( i2 & 1 ) ! = 0 ) {
i = showToast . stringRes ;
}
return showToast . copy ( i ) ;
}
public final int component1 ( ) {
return this . stringRes ;
}
public final ShowToast copy ( int i ) {
return new ShowToast ( i ) ;
}
public boolean equals ( Object obj ) {
if ( this ! = obj ) {
return ( obj instanceof ShowToast ) & & this . stringRes = = ( ( ShowToast ) obj ) . stringRes ;
}
return true ;
}
public final int getStringRes ( ) {
return this . stringRes ;
}
public int hashCode ( ) {
return this . stringRes ;
}
public String toString ( ) {
2021-11-08 18:25:28 +00:00
return a . A ( a . R ( " ShowToast(stringRes= " ) , this . stringRes , " ) " ) ;
2021-06-27 20:44:35 +00:00
}
}
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class UserNotFound extends Event {
public static final UserNotFound INSTANCE = new UserNotFound ( ) ;
private UserNotFound ( ) {
super ( null ) ;
}
}
private Event ( ) {
}
public /* synthetic */ Event ( DefaultConstructorMarker defaultConstructorMarker ) {
this ( ) ;
}
}
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class StoreState {
2021-12-17 22:03:14 +00:00
private final boolean canDisableCommunication ;
2021-06-27 20:44:35 +00:00
private final Channel channel ;
private final Map < Long , GuildMember > computedMembers ;
private final Map < Long , VoiceState > currentChannelVoiceStates ;
private final Guild guild ;
private final Map < Long , GuildRole > guildRoles ;
/* renamed from: me reason: collision with root package name */
2022-01-11 22:19:46 +00:00
private final MeUser f2834me ;
2021-06-27 20:44:35 +00:00
private final boolean muted ;
private final Map < Long , VoiceState > mySelectedVoiceChannelVoiceStates ;
private final StageRoles myStageRoles ;
private final float outputVolume ;
private final Long permissions ;
private final ModelRichPresence richPresence ;
private final boolean selfDeafened ;
private final boolean selfMuted ;
private final Channel stageChannel ;
private final StreamContext streamContext ;
private final User user ;
2021-07-09 21:07:36 +00:00
private final StoreUserNotes . UserNoteState userNoteFetchState ;
2021-11-23 19:35:19 +00:00
private final UserProfile userProfile ;
2021-06-27 20:44:35 +00:00
private final Integer userRelationshipType ;
private final StageRequestToSpeakState userRequestToSpeakState ;
private final StageRoles userStageRoles ;
2021-12-17 22:03:14 +00:00
private StoreState ( User user , MeUser meUser , Channel channel , Map < Long , GuildMember > map , Map < Long , GuildRole > map2 , Map < Long , VoiceState > map3 , Map < Long , VoiceState > map4 , boolean z2 , boolean z3 , boolean z4 , float f , ModelRichPresence modelRichPresence , Guild guild , Long l , StreamContext streamContext , UserProfile userProfile , Integer num , StoreUserNotes . UserNoteState userNoteState , Channel channel2 , StageRoles stageRoles , StageRequestToSpeakState stageRequestToSpeakState , StageRoles stageRoles2 , boolean z5 ) {
2021-06-27 20:44:35 +00:00
this . user = user ;
2022-01-11 22:19:46 +00:00
this . f2834me = meUser ;
2021-06-27 20:44:35 +00:00
this . channel = channel ;
this . computedMembers = map ;
this . guildRoles = map2 ;
this . mySelectedVoiceChannelVoiceStates = map3 ;
this . currentChannelVoiceStates = map4 ;
this . muted = z2 ;
this . selfMuted = z3 ;
this . selfDeafened = z4 ;
this . outputVolume = f ;
this . richPresence = modelRichPresence ;
this . guild = guild ;
this . permissions = l ;
this . streamContext = streamContext ;
2021-11-23 19:35:19 +00:00
this . userProfile = userProfile ;
2021-06-27 20:44:35 +00:00
this . userRelationshipType = num ;
2021-07-09 21:07:36 +00:00
this . userNoteFetchState = userNoteState ;
2021-06-27 20:44:35 +00:00
this . stageChannel = channel2 ;
this . userStageRoles = stageRoles ;
this . userRequestToSpeakState = stageRequestToSpeakState ;
this . myStageRoles = stageRoles2 ;
2021-12-17 22:03:14 +00:00
this . canDisableCommunication = z5 ;
2021-06-27 20:44:35 +00:00
}
2021-12-17 22:03:14 +00:00
public /* synthetic */ StoreState ( User user , MeUser meUser , Channel channel , Map map , Map map2 , Map map3 , Map map4 , boolean z2 , boolean z3 , boolean z4 , float f , ModelRichPresence modelRichPresence , Guild guild , Long l , StreamContext streamContext , UserProfile userProfile , Integer num , StoreUserNotes . UserNoteState userNoteState , Channel channel2 , StageRoles stageRoles , StageRequestToSpeakState stageRequestToSpeakState , StageRoles stageRoles2 , boolean z5 , DefaultConstructorMarker defaultConstructorMarker ) {
this ( user , meUser , channel , map , map2 , map3 , map4 , z2 , z3 , z4 , f , modelRichPresence , guild , l , streamContext , userProfile , num , userNoteState , channel2 , stageRoles , stageRequestToSpeakState , stageRoles2 , z5 ) ;
2021-06-27 20:44:35 +00:00
}
2021-12-17 22:03:14 +00:00
/* renamed from: copy-U9gTzXU$default reason: not valid java name */
public static /* synthetic */ StoreState m49copyU9gTzXU$default ( StoreState storeState , User user , MeUser meUser , Channel channel , Map map , Map map2 , Map map3 , Map map4 , boolean z2 , boolean z3 , boolean z4 , float f , ModelRichPresence modelRichPresence , Guild guild , Long l , StreamContext streamContext , UserProfile userProfile , Integer num , StoreUserNotes . UserNoteState userNoteState , Channel channel2 , StageRoles stageRoles , StageRequestToSpeakState stageRequestToSpeakState , StageRoles stageRoles2 , boolean z5 , int i , Object obj ) {
2022-01-11 22:19:46 +00:00
return storeState . m52copyU9gTzXU ( ( i & 1 ) ! = 0 ? storeState . user : user , ( i & 2 ) ! = 0 ? storeState . f2834me : meUser , ( i & 4 ) ! = 0 ? storeState . channel : channel , ( i & 8 ) ! = 0 ? storeState . computedMembers : map , ( i & 16 ) ! = 0 ? storeState . guildRoles : map2 , ( i & 32 ) ! = 0 ? storeState . mySelectedVoiceChannelVoiceStates : map3 , ( i & 64 ) ! = 0 ? storeState . currentChannelVoiceStates : map4 , ( i & 128 ) ! = 0 ? storeState . muted : z2 , ( i & 256 ) ! = 0 ? storeState . selfMuted : z3 , ( i & 512 ) ! = 0 ? storeState . selfDeafened : z4 , ( i & 1024 ) ! = 0 ? storeState . outputVolume : f , ( i & 2048 ) ! = 0 ? storeState . richPresence : modelRichPresence , ( i & 4096 ) ! = 0 ? storeState . guild : guild , ( i & 8192 ) ! = 0 ? storeState . permissions : l , ( i & 16384 ) ! = 0 ? storeState . streamContext : streamContext , ( i & 32768 ) ! = 0 ? storeState . userProfile : userProfile , ( i & 65536 ) ! = 0 ? storeState . userRelationshipType : num , ( i & 131072 ) ! = 0 ? storeState . userNoteFetchState : userNoteState , ( i & 262144 ) ! = 0 ? storeState . stageChannel : channel2 , ( i & 524288 ) ! = 0 ? storeState . userStageRoles : stageRoles , ( i & 1048576 ) ! = 0 ? storeState . userRequestToSpeakState : stageRequestToSpeakState , ( i & 2097152 ) ! = 0 ? storeState . myStageRoles : stageRoles2 , ( i & 4194304 ) ! = 0 ? storeState . canDisableCommunication : z5 ) ;
2021-06-27 20:44:35 +00:00
}
public final User component1 ( ) {
return this . user ;
}
public final boolean component10 ( ) {
return this . selfDeafened ;
}
public final float component11 ( ) {
return this . outputVolume ;
}
public final ModelRichPresence component12 ( ) {
return this . richPresence ;
}
public final Guild component13 ( ) {
return this . guild ;
}
public final Long component14 ( ) {
return this . permissions ;
}
public final StreamContext component15 ( ) {
return this . streamContext ;
}
2021-11-23 19:35:19 +00:00
public final UserProfile component16 ( ) {
2021-06-27 20:44:35 +00:00
return this . userProfile ;
}
public final Integer component17 ( ) {
return this . userRelationshipType ;
}
public final StoreUserNotes . UserNoteState component18 ( ) {
2021-07-09 21:07:36 +00:00
return this . userNoteFetchState ;
2021-06-27 20:44:35 +00:00
}
public final Channel component19 ( ) {
return this . stageChannel ;
}
public final MeUser component2 ( ) {
2022-01-11 22:19:46 +00:00
return this . f2834me ;
2021-06-27 20:44:35 +00:00
}
/* renamed from: component20-twRsX-0 reason: not valid java name */
2021-11-08 18:25:28 +00:00
public final StageRoles m50component20twRsX0 ( ) {
2021-06-27 20:44:35 +00:00
return this . userStageRoles ;
}
public final StageRequestToSpeakState component21 ( ) {
return this . userRequestToSpeakState ;
}
/* renamed from: component22-twRsX-0 reason: not valid java name */
2021-11-08 18:25:28 +00:00
public final StageRoles m51component22twRsX0 ( ) {
2021-06-27 20:44:35 +00:00
return this . myStageRoles ;
}
2021-12-17 22:03:14 +00:00
public final boolean component23 ( ) {
return this . canDisableCommunication ;
}
2021-06-27 20:44:35 +00:00
public final Channel component3 ( ) {
return this . channel ;
}
public final Map < Long , GuildMember > component4 ( ) {
return this . computedMembers ;
}
public final Map < Long , GuildRole > component5 ( ) {
return this . guildRoles ;
}
public final Map < Long , VoiceState > component6 ( ) {
return this . mySelectedVoiceChannelVoiceStates ;
}
public final Map < Long , VoiceState > component7 ( ) {
return this . currentChannelVoiceStates ;
}
public final boolean component8 ( ) {
return this . muted ;
}
public final boolean component9 ( ) {
return this . selfMuted ;
}
2021-12-17 22:03:14 +00:00
/* renamed from: copy-U9gTzXU reason: not valid java name */
public final StoreState m52copyU9gTzXU ( User user , MeUser meUser , Channel channel , Map < Long , GuildMember > map , Map < Long , GuildRole > map2 , Map < Long , VoiceState > map3 , Map < Long , VoiceState > map4 , boolean z2 , boolean z3 , boolean z4 , float f , ModelRichPresence modelRichPresence , Guild guild , Long l , StreamContext streamContext , UserProfile userProfile , Integer num , StoreUserNotes . UserNoteState userNoteState , Channel channel2 , StageRoles stageRoles , StageRequestToSpeakState stageRequestToSpeakState , StageRoles stageRoles2 , boolean z5 ) {
2021-06-27 20:44:35 +00:00
m . checkNotNullParameter ( user , " user " ) ;
m . checkNotNullParameter ( meUser , " me " ) ;
m . checkNotNullParameter ( map , " computedMembers " ) ;
m . checkNotNullParameter ( map2 , " guildRoles " ) ;
m . checkNotNullParameter ( map3 , " mySelectedVoiceChannelVoiceStates " ) ;
m . checkNotNullParameter ( map4 , " currentChannelVoiceStates " ) ;
2021-11-23 19:35:19 +00:00
m . checkNotNullParameter ( userProfile , " userProfile " ) ;
2021-07-09 21:07:36 +00:00
m . checkNotNullParameter ( userNoteState , " userNoteFetchState " ) ;
2021-06-27 20:44:35 +00:00
m . checkNotNullParameter ( stageRequestToSpeakState , " userRequestToSpeakState " ) ;
2021-12-17 22:03:14 +00:00
return new StoreState ( user , meUser , channel , map , map2 , map3 , map4 , z2 , z3 , z4 , f , modelRichPresence , guild , l , streamContext , userProfile , num , userNoteState , channel2 , stageRoles , stageRequestToSpeakState , stageRoles2 , z5 ) ;
2021-06-27 20:44:35 +00:00
}
public boolean equals ( Object obj ) {
if ( this = = obj ) {
return true ;
}
if ( ! ( obj instanceof StoreState ) ) {
return false ;
}
StoreState storeState = ( StoreState ) obj ;
2022-01-11 22:19:46 +00:00
return m . areEqual ( this . user , storeState . user ) & & m . areEqual ( this . f2834me , storeState . f2834me ) & & m . areEqual ( this . channel , storeState . channel ) & & m . areEqual ( this . computedMembers , storeState . computedMembers ) & & m . areEqual ( this . guildRoles , storeState . guildRoles ) & & m . areEqual ( this . mySelectedVoiceChannelVoiceStates , storeState . mySelectedVoiceChannelVoiceStates ) & & m . areEqual ( this . currentChannelVoiceStates , storeState . currentChannelVoiceStates ) & & this . muted = = storeState . muted & & this . selfMuted = = storeState . selfMuted & & this . selfDeafened = = storeState . selfDeafened & & Float . compare ( this . outputVolume , storeState . outputVolume ) = = 0 & & m . areEqual ( this . richPresence , storeState . richPresence ) & & m . areEqual ( this . guild , storeState . guild ) & & m . areEqual ( this . permissions , storeState . permissions ) & & m . areEqual ( this . streamContext , storeState . streamContext ) & & m . areEqual ( this . userProfile , storeState . userProfile ) & & m . areEqual ( this . userRelationshipType , storeState . userRelationshipType ) & & m . areEqual ( this . userNoteFetchState , storeState . userNoteFetchState ) & & m . areEqual ( this . stageChannel , storeState . stageChannel ) & & m . areEqual ( this . userStageRoles , storeState . userStageRoles ) & & m . areEqual ( this . userRequestToSpeakState , storeState . userRequestToSpeakState ) & & m . areEqual ( this . myStageRoles , storeState . myStageRoles ) & & this . canDisableCommunication = = storeState . canDisableCommunication ;
2021-12-17 22:03:14 +00:00
}
public final boolean getCanDisableCommunication ( ) {
return this . canDisableCommunication ;
2021-06-27 20:44:35 +00:00
}
public final Channel getChannel ( ) {
return this . channel ;
}
public final Map < Long , GuildMember > getComputedMembers ( ) {
return this . computedMembers ;
}
public final Map < Long , VoiceState > getCurrentChannelVoiceStates ( ) {
return this . currentChannelVoiceStates ;
}
public final Guild getGuild ( ) {
return this . guild ;
}
public final Map < Long , GuildRole > getGuildRoles ( ) {
return this . guildRoles ;
}
public final MeUser getMe ( ) {
2022-01-11 22:19:46 +00:00
return this . f2834me ;
2021-06-27 20:44:35 +00:00
}
public final boolean getMuted ( ) {
return this . muted ;
}
public final Map < Long , VoiceState > getMySelectedVoiceChannelVoiceStates ( ) {
return this . mySelectedVoiceChannelVoiceStates ;
}
/* renamed from: getMyStageRoles-twRsX-0 reason: not valid java name */
2021-11-08 18:25:28 +00:00
public final StageRoles m53getMyStageRolestwRsX0 ( ) {
2021-06-27 20:44:35 +00:00
return this . myStageRoles ;
}
public final float getOutputVolume ( ) {
return this . outputVolume ;
}
public final Long getPermissions ( ) {
return this . permissions ;
}
public final ModelRichPresence getRichPresence ( ) {
return this . richPresence ;
}
public final boolean getSelfDeafened ( ) {
return this . selfDeafened ;
}
public final boolean getSelfMuted ( ) {
return this . selfMuted ;
}
public final Channel getStageChannel ( ) {
return this . stageChannel ;
}
public final StreamContext getStreamContext ( ) {
return this . streamContext ;
}
public final User getUser ( ) {
return this . user ;
}
2021-07-09 21:07:36 +00:00
public final StoreUserNotes . UserNoteState getUserNoteFetchState ( ) {
return this . userNoteFetchState ;
2021-06-27 20:44:35 +00:00
}
2021-11-23 19:35:19 +00:00
public final UserProfile getUserProfile ( ) {
2021-06-27 20:44:35 +00:00
return this . userProfile ;
}
public final Integer getUserRelationshipType ( ) {
return this . userRelationshipType ;
}
public final StageRequestToSpeakState getUserRequestToSpeakState ( ) {
return this . userRequestToSpeakState ;
}
/* renamed from: getUserStageRoles-twRsX-0 reason: not valid java name */
2021-11-08 18:25:28 +00:00
public final StageRoles m54getUserStageRolestwRsX0 ( ) {
2021-06-27 20:44:35 +00:00
return this . userStageRoles ;
}
public int hashCode ( ) {
User user = this . user ;
int i = 0 ;
int hashCode = ( user ! = null ? user . hashCode ( ) : 0 ) * 31 ;
2022-01-11 22:19:46 +00:00
MeUser meUser = this . f2834me ;
2021-06-27 20:44:35 +00:00
int hashCode2 = ( hashCode + ( meUser ! = null ? meUser . hashCode ( ) : 0 ) ) * 31 ;
Channel channel = this . channel ;
int hashCode3 = ( hashCode2 + ( channel ! = null ? channel . hashCode ( ) : 0 ) ) * 31 ;
Map < Long , GuildMember > map = this . computedMembers ;
int hashCode4 = ( hashCode3 + ( map ! = null ? map . hashCode ( ) : 0 ) ) * 31 ;
Map < Long , GuildRole > map2 = this . guildRoles ;
int hashCode5 = ( hashCode4 + ( map2 ! = null ? map2 . hashCode ( ) : 0 ) ) * 31 ;
Map < Long , VoiceState > map3 = this . mySelectedVoiceChannelVoiceStates ;
int hashCode6 = ( hashCode5 + ( map3 ! = null ? map3 . hashCode ( ) : 0 ) ) * 31 ;
Map < Long , VoiceState > map4 = this . currentChannelVoiceStates ;
int hashCode7 = ( hashCode6 + ( map4 ! = null ? map4 . hashCode ( ) : 0 ) ) * 31 ;
boolean z2 = this . muted ;
int i2 = 1 ;
if ( z2 ) {
z2 = true ;
}
int i3 = z2 ? 1 : 0 ;
int i4 = z2 ? 1 : 0 ;
int i5 = z2 ? 1 : 0 ;
int i6 = ( hashCode7 + i3 ) * 31 ;
boolean z3 = this . selfMuted ;
if ( z3 ) {
z3 = true ;
}
int i7 = z3 ? 1 : 0 ;
int i8 = z3 ? 1 : 0 ;
int i9 = z3 ? 1 : 0 ;
int i10 = ( i6 + i7 ) * 31 ;
boolean z4 = this . selfDeafened ;
2021-12-17 22:03:14 +00:00
if ( z4 ) {
z4 = true ;
2021-06-27 20:44:35 +00:00
}
2021-12-17 22:03:14 +00:00
int i11 = z4 ? 1 : 0 ;
int i12 = z4 ? 1 : 0 ;
int i13 = z4 ? 1 : 0 ;
int floatToIntBits = ( Float . floatToIntBits ( this . outputVolume ) + ( ( i10 + i11 ) * 31 ) ) * 31 ;
2021-06-27 20:44:35 +00:00
ModelRichPresence modelRichPresence = this . richPresence ;
2021-07-20 22:20:08 +00:00
int hashCode8 = ( floatToIntBits + ( modelRichPresence ! = null ? modelRichPresence . hashCode ( ) : 0 ) ) * 31 ;
2021-06-27 20:44:35 +00:00
Guild guild = this . guild ;
int hashCode9 = ( hashCode8 + ( guild ! = null ? guild . hashCode ( ) : 0 ) ) * 31 ;
Long l = this . permissions ;
int hashCode10 = ( hashCode9 + ( l ! = null ? l . hashCode ( ) : 0 ) ) * 31 ;
StreamContext streamContext = this . streamContext ;
int hashCode11 = ( hashCode10 + ( streamContext ! = null ? streamContext . hashCode ( ) : 0 ) ) * 31 ;
2021-11-23 19:35:19 +00:00
UserProfile userProfile = this . userProfile ;
int hashCode12 = ( hashCode11 + ( userProfile ! = null ? userProfile . hashCode ( ) : 0 ) ) * 31 ;
2021-06-27 20:44:35 +00:00
Integer num = this . userRelationshipType ;
int hashCode13 = ( hashCode12 + ( num ! = null ? num . hashCode ( ) : 0 ) ) * 31 ;
2021-07-09 21:07:36 +00:00
StoreUserNotes . UserNoteState userNoteState = this . userNoteFetchState ;
2021-06-27 20:44:35 +00:00
int hashCode14 = ( hashCode13 + ( userNoteState ! = null ? userNoteState . hashCode ( ) : 0 ) ) * 31 ;
Channel channel2 = this . stageChannel ;
int hashCode15 = ( hashCode14 + ( channel2 ! = null ? channel2 . hashCode ( ) : 0 ) ) * 31 ;
StageRoles stageRoles = this . userStageRoles ;
int hashCode16 = ( hashCode15 + ( stageRoles ! = null ? stageRoles . hashCode ( ) : 0 ) ) * 31 ;
StageRequestToSpeakState stageRequestToSpeakState = this . userRequestToSpeakState ;
int hashCode17 = ( hashCode16 + ( stageRequestToSpeakState ! = null ? stageRequestToSpeakState . hashCode ( ) : 0 ) ) * 31 ;
StageRoles stageRoles2 = this . myStageRoles ;
if ( stageRoles2 ! = null ) {
i = stageRoles2 . hashCode ( ) ;
}
2021-12-17 22:03:14 +00:00
int i14 = ( hashCode17 + i ) * 31 ;
boolean z5 = this . canDisableCommunication ;
if ( ! z5 ) {
i2 = z5 ? 1 : 0 ;
}
return i14 + i2 ;
2021-06-27 20:44:35 +00:00
}
public String toString ( ) {
2021-11-08 18:25:28 +00:00
StringBuilder R = a . R ( " StoreState(user= " ) ;
R . append ( this . user ) ;
R . append ( " , me= " ) ;
2022-01-11 22:19:46 +00:00
R . append ( this . f2834me ) ;
2021-11-08 18:25:28 +00:00
R . append ( " , channel= " ) ;
R . append ( this . channel ) ;
R . append ( " , computedMembers= " ) ;
R . append ( this . computedMembers ) ;
R . append ( " , guildRoles= " ) ;
R . append ( this . guildRoles ) ;
R . append ( " , mySelectedVoiceChannelVoiceStates= " ) ;
R . append ( this . mySelectedVoiceChannelVoiceStates ) ;
R . append ( " , currentChannelVoiceStates= " ) ;
R . append ( this . currentChannelVoiceStates ) ;
R . append ( " , muted= " ) ;
R . append ( this . muted ) ;
R . append ( " , selfMuted= " ) ;
R . append ( this . selfMuted ) ;
R . append ( " , selfDeafened= " ) ;
R . append ( this . selfDeafened ) ;
R . append ( " , outputVolume= " ) ;
R . append ( this . outputVolume ) ;
R . append ( " , richPresence= " ) ;
R . append ( this . richPresence ) ;
R . append ( " , guild= " ) ;
R . append ( this . guild ) ;
R . append ( " , permissions= " ) ;
R . append ( this . permissions ) ;
R . append ( " , streamContext= " ) ;
R . append ( this . streamContext ) ;
R . append ( " , userProfile= " ) ;
R . append ( this . userProfile ) ;
R . append ( " , userRelationshipType= " ) ;
R . append ( this . userRelationshipType ) ;
R . append ( " , userNoteFetchState= " ) ;
R . append ( this . userNoteFetchState ) ;
R . append ( " , stageChannel= " ) ;
R . append ( this . stageChannel ) ;
R . append ( " , userStageRoles= " ) ;
R . append ( this . userStageRoles ) ;
R . append ( " , userRequestToSpeakState= " ) ;
R . append ( this . userRequestToSpeakState ) ;
R . append ( " , myStageRoles= " ) ;
R . append ( this . myStageRoles ) ;
2021-12-17 22:03:14 +00:00
R . append ( " , canDisableCommunication= " ) ;
return a . L ( R , this . canDisableCommunication , " ) " ) ;
2021-06-27 20:44:35 +00:00
}
}
/* compiled from: WidgetUserSheetViewModel.kt */
public static abstract class ViewState {
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class Loaded extends ViewState {
private final UserProfileAdminView . ViewState adminViewState ;
private final List < Node < MessageRenderContext > > bioAst ;
private final Channel channel ;
private final VoiceState channelVoiceState ;
private final UserProfileConnectionsView . ViewState connectionsViewState ;
2021-09-14 19:31:33 +00:00
private final Long currentGuildId ;
2021-12-17 22:03:14 +00:00
private final String guildIcon ;
private final String guildIconURL ;
2021-09-14 19:31:33 +00:00
private final Long guildId ;
2021-11-30 23:47:08 +00:00
private final GuildMember guildMember ;
2021-06-27 20:44:35 +00:00
private final String guildName ;
private final String guildSectionHeaderText ;
2021-12-17 22:03:14 +00:00
private final boolean hasGuildMemberBio ;
2021-07-13 20:48:29 +00:00
private final boolean hasPremiumCustomization ;
2021-06-27 20:44:35 +00:00
private final boolean isMe ;
2021-07-13 20:48:29 +00:00
private final boolean profileLoaded ;
2021-06-27 20:44:35 +00:00
private final ModelRichPresence richPresence ;
private final List < GuildRole > roleItems ;
private final boolean showVoiceSettings ;
private final UserProfileStageActionsView . ViewState stageViewState ;
private final StreamContext streamContext ;
private final User user ;
private final boolean userInSameVoiceChannel ;
2021-07-09 21:07:36 +00:00
private final String userNote ;
private final StoreUserNotes . UserNoteState userNoteFetchState ;
2022-01-11 22:19:46 +00:00
private final UserProfile userProfile ;
2021-06-27 20:44:35 +00:00
private final int userRelationshipType ;
private final UserProfileVoiceSettingsView . ViewState voiceSettingsViewState ;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
2022-01-11 22:19:46 +00:00
public Loaded ( User user , boolean z2 , boolean z3 , UserProfileVoiceSettingsView . ViewState viewState , VoiceState voiceState , ModelRichPresence modelRichPresence , String str , List < GuildRole > list , UserProfileAdminView . ViewState viewState2 , UserProfileStageActionsView . ViewState viewState3 , Channel channel , StreamContext streamContext , String str2 , String str3 , int i , UserProfileConnectionsView . ViewState viewState4 , StoreUserNotes . UserNoteState userNoteState , String str4 , boolean z4 , List < Node < MessageRenderContext > > list2 , boolean z5 , Long l , GuildMember guildMember , UserProfile userProfile ) {
2021-06-27 20:44:35 +00:00
super ( null ) ;
2021-07-13 20:48:29 +00:00
String avatar ;
2021-06-27 20:44:35 +00:00
m . checkNotNullParameter ( user , " user " ) ;
m . checkNotNullParameter ( viewState , " voiceSettingsViewState " ) ;
m . checkNotNullParameter ( list , " roleItems " ) ;
m . checkNotNullParameter ( viewState3 , " stageViewState " ) ;
m . checkNotNullParameter ( viewState4 , " connectionsViewState " ) ;
2021-07-09 21:07:36 +00:00
m . checkNotNullParameter ( userNoteState , " userNoteFetchState " ) ;
2021-12-17 22:03:14 +00:00
String str5 = null ;
2021-06-27 20:44:35 +00:00
this . user = user ;
this . isMe = z2 ;
this . showVoiceSettings = z3 ;
this . voiceSettingsViewState = viewState ;
this . channelVoiceState = voiceState ;
this . richPresence = modelRichPresence ;
this . guildSectionHeaderText = str ;
this . roleItems = list ;
this . adminViewState = viewState2 ;
this . stageViewState = viewState3 ;
this . channel = channel ;
this . streamContext = streamContext ;
this . guildName = str2 ;
2021-12-17 22:03:14 +00:00
this . guildIcon = str3 ;
2021-06-27 20:44:35 +00:00
this . userRelationshipType = i ;
this . connectionsViewState = viewState4 ;
2021-07-09 21:07:36 +00:00
this . userNoteFetchState = userNoteState ;
2021-12-17 22:03:14 +00:00
this . userNote = str4 ;
2021-06-27 20:44:35 +00:00
this . userInSameVoiceChannel = z4 ;
this . bioAst = list2 ;
2021-07-13 20:48:29 +00:00
this . profileLoaded = z5 ;
2021-09-14 19:31:33 +00:00
this . guildId = l ;
2021-11-30 23:47:08 +00:00
this . guildMember = guildMember ;
2022-01-11 22:19:46 +00:00
this . userProfile = userProfile ;
2021-12-17 22:03:14 +00:00
boolean z6 = false ;
this . hasPremiumCustomization = user . getBanner ( ) ! = null | | ( ( avatar = user . getAvatar ( ) ) ! = null & & IconUtils . INSTANCE . isImageHashAnimated ( avatar ) ) ;
2021-09-14 19:31:33 +00:00
this . currentGuildId = channel ! = null ? Long . valueOf ( channel . f ( ) ) : l ;
2021-12-17 22:03:14 +00:00
String bio = guildMember ! = null ? guildMember . getBio ( ) : null ;
this . hasGuildMemberBio = ! ( ( bio = = null | | bio . length ( ) = = 0 ) ? true : z6 ) ;
this . guildIconURL = str3 ! = null ? IconUtils . getForGuild$default ( l , str3 , null , false , Integer . valueOf ( DimenUtils . dpToPixels ( 16 ) ) , 4 , null ) : str5 ;
2021-06-27 20:44:35 +00:00
}
2022-01-11 22:19:46 +00:00
public static /* synthetic */ Loaded copy$default ( Loaded loaded , User user , boolean z2 , boolean z3 , UserProfileVoiceSettingsView . ViewState viewState , VoiceState voiceState , ModelRichPresence modelRichPresence , String str , List list , UserProfileAdminView . ViewState viewState2 , UserProfileStageActionsView . ViewState viewState3 , Channel channel , StreamContext streamContext , String str2 , String str3 , int i , UserProfileConnectionsView . ViewState viewState4 , StoreUserNotes . UserNoteState userNoteState , String str4 , boolean z4 , List list2 , boolean z5 , Long l , GuildMember guildMember , UserProfile userProfile , int i2 , Object obj ) {
return loaded . copy ( ( i2 & 1 ) ! = 0 ? loaded . user : user , ( i2 & 2 ) ! = 0 ? loaded . isMe : z2 , ( i2 & 4 ) ! = 0 ? loaded . showVoiceSettings : z3 , ( i2 & 8 ) ! = 0 ? loaded . voiceSettingsViewState : viewState , ( i2 & 16 ) ! = 0 ? loaded . channelVoiceState : voiceState , ( i2 & 32 ) ! = 0 ? loaded . richPresence : modelRichPresence , ( i2 & 64 ) ! = 0 ? loaded . guildSectionHeaderText : str , ( i2 & 128 ) ! = 0 ? loaded . roleItems : list , ( i2 & 256 ) ! = 0 ? loaded . adminViewState : viewState2 , ( i2 & 512 ) ! = 0 ? loaded . stageViewState : viewState3 , ( i2 & 1024 ) ! = 0 ? loaded . channel : channel , ( i2 & 2048 ) ! = 0 ? loaded . streamContext : streamContext , ( i2 & 4096 ) ! = 0 ? loaded . guildName : str2 , ( i2 & 8192 ) ! = 0 ? loaded . guildIcon : str3 , ( i2 & 16384 ) ! = 0 ? loaded . userRelationshipType : i , ( i2 & 32768 ) ! = 0 ? loaded . connectionsViewState : viewState4 , ( i2 & 65536 ) ! = 0 ? loaded . userNoteFetchState : userNoteState , ( i2 & 131072 ) ! = 0 ? loaded . userNote : str4 , ( i2 & 262144 ) ! = 0 ? loaded . userInSameVoiceChannel : z4 , ( i2 & 524288 ) ! = 0 ? loaded . bioAst : list2 , ( i2 & 1048576 ) ! = 0 ? loaded . profileLoaded : z5 , ( i2 & 2097152 ) ! = 0 ? loaded . guildId : l , ( i2 & 4194304 ) ! = 0 ? loaded . guildMember : guildMember , ( i2 & 8388608 ) ! = 0 ? loaded . userProfile : userProfile ) ;
2021-06-27 20:44:35 +00:00
}
public final User component1 ( ) {
return this . user ;
}
public final UserProfileStageActionsView . ViewState component10 ( ) {
return this . stageViewState ;
}
public final Channel component11 ( ) {
return this . channel ;
}
public final StreamContext component12 ( ) {
return this . streamContext ;
}
public final String component13 ( ) {
return this . guildName ;
}
2021-12-17 22:03:14 +00:00
public final String component14 ( ) {
return this . guildIcon ;
}
public final int component15 ( ) {
2021-06-27 20:44:35 +00:00
return this . userRelationshipType ;
}
2021-12-17 22:03:14 +00:00
public final UserProfileConnectionsView . ViewState component16 ( ) {
2021-06-27 20:44:35 +00:00
return this . connectionsViewState ;
}
2021-12-17 22:03:14 +00:00
public final StoreUserNotes . UserNoteState component17 ( ) {
2021-07-09 21:07:36 +00:00
return this . userNoteFetchState ;
}
2021-12-17 22:03:14 +00:00
public final String component18 ( ) {
2021-06-27 20:44:35 +00:00
return this . userNote ;
}
2021-12-17 22:03:14 +00:00
public final boolean component19 ( ) {
2021-06-27 20:44:35 +00:00
return this . userInSameVoiceChannel ;
}
public final boolean component2 ( ) {
return this . isMe ;
}
2021-12-17 22:03:14 +00:00
public final List < Node < MessageRenderContext > > component20 ( ) {
return this . bioAst ;
}
public final boolean component21 ( ) {
2021-07-13 20:48:29 +00:00
return this . profileLoaded ;
}
2021-12-17 22:03:14 +00:00
public final Long component22 ( ) {
2021-09-14 19:31:33 +00:00
return this . guildId ;
}
2021-12-17 22:03:14 +00:00
public final GuildMember component23 ( ) {
2021-11-30 23:47:08 +00:00
return this . guildMember ;
}
2022-01-11 22:19:46 +00:00
public final UserProfile component24 ( ) {
return this . userProfile ;
}
2021-06-27 20:44:35 +00:00
public final boolean component3 ( ) {
return this . showVoiceSettings ;
}
public final UserProfileVoiceSettingsView . ViewState component4 ( ) {
return this . voiceSettingsViewState ;
}
public final VoiceState component5 ( ) {
return this . channelVoiceState ;
}
public final ModelRichPresence component6 ( ) {
return this . richPresence ;
}
public final String component7 ( ) {
return this . guildSectionHeaderText ;
}
public final List < GuildRole > component8 ( ) {
return this . roleItems ;
}
public final UserProfileAdminView . ViewState component9 ( ) {
return this . adminViewState ;
}
2022-01-11 22:19:46 +00:00
public final Loaded copy ( User user , boolean z2 , boolean z3 , UserProfileVoiceSettingsView . ViewState viewState , VoiceState voiceState , ModelRichPresence modelRichPresence , String str , List < GuildRole > list , UserProfileAdminView . ViewState viewState2 , UserProfileStageActionsView . ViewState viewState3 , Channel channel , StreamContext streamContext , String str2 , String str3 , int i , UserProfileConnectionsView . ViewState viewState4 , StoreUserNotes . UserNoteState userNoteState , String str4 , boolean z4 , List < Node < MessageRenderContext > > list2 , boolean z5 , Long l , GuildMember guildMember , UserProfile userProfile ) {
2021-06-27 20:44:35 +00:00
m . checkNotNullParameter ( user , " user " ) ;
m . checkNotNullParameter ( viewState , " voiceSettingsViewState " ) ;
m . checkNotNullParameter ( list , " roleItems " ) ;
m . checkNotNullParameter ( viewState3 , " stageViewState " ) ;
m . checkNotNullParameter ( viewState4 , " connectionsViewState " ) ;
2021-07-09 21:07:36 +00:00
m . checkNotNullParameter ( userNoteState , " userNoteFetchState " ) ;
2022-01-11 22:19:46 +00:00
return new Loaded ( user , z2 , z3 , viewState , voiceState , modelRichPresence , str , list , viewState2 , viewState3 , channel , streamContext , str2 , str3 , i , viewState4 , userNoteState , str4 , z4 , list2 , z5 , l , guildMember , userProfile ) ;
2021-06-27 20:44:35 +00:00
}
public boolean equals ( Object obj ) {
if ( this = = obj ) {
return true ;
}
if ( ! ( obj instanceof Loaded ) ) {
return false ;
}
Loaded loaded = ( Loaded ) obj ;
2022-01-11 22:19:46 +00:00
return m . areEqual ( this . user , loaded . user ) & & this . isMe = = loaded . isMe & & this . showVoiceSettings = = loaded . showVoiceSettings & & m . areEqual ( this . voiceSettingsViewState , loaded . voiceSettingsViewState ) & & m . areEqual ( this . channelVoiceState , loaded . channelVoiceState ) & & m . areEqual ( this . richPresence , loaded . richPresence ) & & m . areEqual ( this . guildSectionHeaderText , loaded . guildSectionHeaderText ) & & m . areEqual ( this . roleItems , loaded . roleItems ) & & m . areEqual ( this . adminViewState , loaded . adminViewState ) & & m . areEqual ( this . stageViewState , loaded . stageViewState ) & & m . areEqual ( this . channel , loaded . channel ) & & m . areEqual ( this . streamContext , loaded . streamContext ) & & m . areEqual ( this . guildName , loaded . guildName ) & & m . areEqual ( this . guildIcon , loaded . guildIcon ) & & this . userRelationshipType = = loaded . userRelationshipType & & m . areEqual ( this . connectionsViewState , loaded . connectionsViewState ) & & m . areEqual ( this . userNoteFetchState , loaded . userNoteFetchState ) & & m . areEqual ( this . userNote , loaded . userNote ) & & this . userInSameVoiceChannel = = loaded . userInSameVoiceChannel & & m . areEqual ( this . bioAst , loaded . bioAst ) & & this . profileLoaded = = loaded . profileLoaded & & m . areEqual ( this . guildId , loaded . guildId ) & & m . areEqual ( this . guildMember , loaded . guildMember ) & & m . areEqual ( this . userProfile , loaded . userProfile ) ;
2021-06-27 20:44:35 +00:00
}
public final UserProfileAdminView . ViewState getAdminViewState ( ) {
return this . adminViewState ;
}
public final List < Node < MessageRenderContext > > getBioAst ( ) {
return this . bioAst ;
}
public final Channel getChannel ( ) {
return this . channel ;
}
public final VoiceState getChannelVoiceState ( ) {
return this . channelVoiceState ;
}
public final UserProfileConnectionsView . ViewState getConnectionsViewState ( ) {
return this . connectionsViewState ;
}
2021-09-14 19:31:33 +00:00
public final Long getCurrentGuildId ( ) {
return this . currentGuildId ;
}
2021-12-17 22:03:14 +00:00
public final String getGuildIcon ( ) {
return this . guildIcon ;
}
public final String getGuildIconURL ( ) {
return this . guildIconURL ;
}
2021-09-14 19:31:33 +00:00
public final Long getGuildId ( ) {
return this . guildId ;
}
2021-11-30 23:47:08 +00:00
public final GuildMember getGuildMember ( ) {
return this . guildMember ;
}
2021-06-27 20:44:35 +00:00
public final String getGuildName ( ) {
return this . guildName ;
}
public final String getGuildSectionHeaderText ( ) {
return this . guildSectionHeaderText ;
}
2021-12-17 22:03:14 +00:00
public final boolean getHasGuildMemberBio ( ) {
return this . hasGuildMemberBio ;
}
2021-07-13 20:48:29 +00:00
public final boolean getHasPremiumCustomization ( ) {
return this . hasPremiumCustomization ;
}
2021-06-27 20:44:35 +00:00
public final Presence getPresence ( ) {
ModelRichPresence modelRichPresence = this . richPresence ;
if ( modelRichPresence ! = null ) {
return modelRichPresence . getPresence ( ) ;
}
return null ;
}
2021-07-13 20:48:29 +00:00
public final boolean getProfileLoaded ( ) {
return this . profileLoaded ;
}
2021-06-27 20:44:35 +00:00
public final ModelRichPresence getRichPresence ( ) {
return this . richPresence ;
}
public final List < GuildRole > getRoleItems ( ) {
return this . roleItems ;
}
public final boolean getShowVoiceSettings ( ) {
return this . showVoiceSettings ;
}
public final UserProfileStageActionsView . ViewState getStageViewState ( ) {
return this . stageViewState ;
}
public final StreamContext getStreamContext ( ) {
return this . streamContext ;
}
public final User getUser ( ) {
return this . user ;
}
public final boolean getUserInSameVoiceChannel ( ) {
return this . userInSameVoiceChannel ;
}
2021-07-09 21:07:36 +00:00
public final String getUserNote ( ) {
2021-06-27 20:44:35 +00:00
return this . userNote ;
}
2021-07-09 21:07:36 +00:00
public final StoreUserNotes . UserNoteState getUserNoteFetchState ( ) {
return this . userNoteFetchState ;
}
2022-01-11 22:19:46 +00:00
public final UserProfile getUserProfile ( ) {
return this . userProfile ;
}
2021-06-27 20:44:35 +00:00
public final int getUserRelationshipType ( ) {
return this . userRelationshipType ;
}
public final UserProfileVoiceSettingsView . ViewState getVoiceSettingsViewState ( ) {
return this . voiceSettingsViewState ;
}
public int hashCode ( ) {
User user = this . user ;
int i = 0 ;
int hashCode = ( user ! = null ? user . hashCode ( ) : 0 ) * 31 ;
boolean z2 = this . isMe ;
int i2 = 1 ;
if ( z2 ) {
z2 = true ;
}
int i3 = z2 ? 1 : 0 ;
int i4 = z2 ? 1 : 0 ;
int i5 = z2 ? 1 : 0 ;
int i6 = ( hashCode + i3 ) * 31 ;
boolean z3 = this . showVoiceSettings ;
if ( z3 ) {
z3 = true ;
}
int i7 = z3 ? 1 : 0 ;
int i8 = z3 ? 1 : 0 ;
int i9 = z3 ? 1 : 0 ;
int i10 = ( i6 + i7 ) * 31 ;
UserProfileVoiceSettingsView . ViewState viewState = this . voiceSettingsViewState ;
int hashCode2 = ( i10 + ( viewState ! = null ? viewState . hashCode ( ) : 0 ) ) * 31 ;
VoiceState voiceState = this . channelVoiceState ;
int hashCode3 = ( hashCode2 + ( voiceState ! = null ? voiceState . hashCode ( ) : 0 ) ) * 31 ;
ModelRichPresence modelRichPresence = this . richPresence ;
int hashCode4 = ( hashCode3 + ( modelRichPresence ! = null ? modelRichPresence . hashCode ( ) : 0 ) ) * 31 ;
String str = this . guildSectionHeaderText ;
int hashCode5 = ( hashCode4 + ( str ! = null ? str . hashCode ( ) : 0 ) ) * 31 ;
List < GuildRole > list = this . roleItems ;
int hashCode6 = ( hashCode5 + ( list ! = null ? list . hashCode ( ) : 0 ) ) * 31 ;
UserProfileAdminView . ViewState viewState2 = this . adminViewState ;
int hashCode7 = ( hashCode6 + ( viewState2 ! = null ? viewState2 . hashCode ( ) : 0 ) ) * 31 ;
UserProfileStageActionsView . ViewState viewState3 = this . stageViewState ;
int hashCode8 = ( hashCode7 + ( viewState3 ! = null ? viewState3 . hashCode ( ) : 0 ) ) * 31 ;
Channel channel = this . channel ;
int hashCode9 = ( hashCode8 + ( channel ! = null ? channel . hashCode ( ) : 0 ) ) * 31 ;
StreamContext streamContext = this . streamContext ;
int hashCode10 = ( hashCode9 + ( streamContext ! = null ? streamContext . hashCode ( ) : 0 ) ) * 31 ;
String str2 = this . guildName ;
2021-12-17 22:03:14 +00:00
int hashCode11 = ( hashCode10 + ( str2 ! = null ? str2 . hashCode ( ) : 0 ) ) * 31 ;
String str3 = this . guildIcon ;
int hashCode12 = ( ( ( hashCode11 + ( str3 ! = null ? str3 . hashCode ( ) : 0 ) ) * 31 ) + this . userRelationshipType ) * 31 ;
2021-06-27 20:44:35 +00:00
UserProfileConnectionsView . ViewState viewState4 = this . connectionsViewState ;
2021-12-17 22:03:14 +00:00
int hashCode13 = ( hashCode12 + ( viewState4 ! = null ? viewState4 . hashCode ( ) : 0 ) ) * 31 ;
2021-07-09 21:07:36 +00:00
StoreUserNotes . UserNoteState userNoteState = this . userNoteFetchState ;
2021-12-17 22:03:14 +00:00
int hashCode14 = ( hashCode13 + ( userNoteState ! = null ? userNoteState . hashCode ( ) : 0 ) ) * 31 ;
String str4 = this . userNote ;
int hashCode15 = ( hashCode14 + ( str4 ! = null ? str4 . hashCode ( ) : 0 ) ) * 31 ;
2021-06-27 20:44:35 +00:00
boolean z4 = this . userInSameVoiceChannel ;
2021-07-13 20:48:29 +00:00
if ( z4 ) {
z4 = true ;
2021-06-27 20:44:35 +00:00
}
2021-07-13 20:48:29 +00:00
int i11 = z4 ? 1 : 0 ;
int i12 = z4 ? 1 : 0 ;
int i13 = z4 ? 1 : 0 ;
2021-12-17 22:03:14 +00:00
int i14 = ( hashCode15 + i11 ) * 31 ;
2021-06-27 20:44:35 +00:00
List < Node < MessageRenderContext > > list2 = this . bioAst ;
2021-12-17 22:03:14 +00:00
int hashCode16 = ( i14 + ( list2 ! = null ? list2 . hashCode ( ) : 0 ) ) * 31 ;
2021-07-13 20:48:29 +00:00
boolean z5 = this . profileLoaded ;
2021-10-26 23:51:06 +00:00
if ( ! z5 ) {
i2 = z5 ? 1 : 0 ;
2021-09-14 19:31:33 +00:00
}
2021-12-17 22:03:14 +00:00
int i15 = ( hashCode16 + i2 ) * 31 ;
2021-09-14 19:31:33 +00:00
Long l = this . guildId ;
2021-12-17 22:03:14 +00:00
int hashCode17 = ( i15 + ( l ! = null ? l . hashCode ( ) : 0 ) ) * 31 ;
2021-11-30 23:47:08 +00:00
GuildMember guildMember = this . guildMember ;
2022-01-11 22:19:46 +00:00
int hashCode18 = ( hashCode17 + ( guildMember ! = null ? guildMember . hashCode ( ) : 0 ) ) * 31 ;
UserProfile userProfile = this . userProfile ;
if ( userProfile ! = null ) {
i = userProfile . hashCode ( ) ;
2021-07-27 04:36:47 +00:00
}
2022-01-11 22:19:46 +00:00
return hashCode18 + i ;
2021-06-27 20:44:35 +00:00
}
public final boolean isMe ( ) {
return this . isMe ;
}
2021-09-14 19:31:33 +00:00
public final boolean shouldShowRoles ( ) {
Long l = this . currentGuildId ;
return ( this . roleItems . isEmpty ( ) ^ true ) & & ( l ! = null & & ( l . longValue ( ) > 0 ? 1 : ( l . longValue ( ) = = 0 ? 0 : - 1 ) ) > 0 ) ;
}
2021-06-27 20:44:35 +00:00
public String toString ( ) {
2021-11-08 18:25:28 +00:00
StringBuilder R = a . R ( " Loaded(user= " ) ;
R . append ( this . user ) ;
R . append ( " , isMe= " ) ;
R . append ( this . isMe ) ;
R . append ( " , showVoiceSettings= " ) ;
R . append ( this . showVoiceSettings ) ;
R . append ( " , voiceSettingsViewState= " ) ;
R . append ( this . voiceSettingsViewState ) ;
R . append ( " , channelVoiceState= " ) ;
R . append ( this . channelVoiceState ) ;
R . append ( " , richPresence= " ) ;
R . append ( this . richPresence ) ;
R . append ( " , guildSectionHeaderText= " ) ;
R . append ( this . guildSectionHeaderText ) ;
R . append ( " , roleItems= " ) ;
R . append ( this . roleItems ) ;
R . append ( " , adminViewState= " ) ;
R . append ( this . adminViewState ) ;
R . append ( " , stageViewState= " ) ;
R . append ( this . stageViewState ) ;
R . append ( " , channel= " ) ;
R . append ( this . channel ) ;
R . append ( " , streamContext= " ) ;
R . append ( this . streamContext ) ;
R . append ( " , guildName= " ) ;
R . append ( this . guildName ) ;
2021-12-17 22:03:14 +00:00
R . append ( " , guildIcon= " ) ;
R . append ( this . guildIcon ) ;
2021-11-08 18:25:28 +00:00
R . append ( " , userRelationshipType= " ) ;
R . append ( this . userRelationshipType ) ;
R . append ( " , connectionsViewState= " ) ;
R . append ( this . connectionsViewState ) ;
R . append ( " , userNoteFetchState= " ) ;
R . append ( this . userNoteFetchState ) ;
R . append ( " , userNote= " ) ;
R . append ( this . userNote ) ;
R . append ( " , userInSameVoiceChannel= " ) ;
R . append ( this . userInSameVoiceChannel ) ;
R . append ( " , bioAst= " ) ;
R . append ( this . bioAst ) ;
R . append ( " , profileLoaded= " ) ;
R . append ( this . profileLoaded ) ;
R . append ( " , guildId= " ) ;
2021-11-30 23:47:08 +00:00
R . append ( this . guildId ) ;
R . append ( " , guildMember= " ) ;
R . append ( this . guildMember ) ;
2022-01-11 22:19:46 +00:00
R . append ( " , userProfile= " ) ;
R . append ( this . userProfile ) ;
2021-11-30 23:47:08 +00:00
R . append ( " ) " ) ;
return R . toString ( ) ;
2021-06-27 20:44:35 +00:00
}
}
/* compiled from: WidgetUserSheetViewModel.kt */
public static final class Uninitialized extends ViewState {
public static final Uninitialized INSTANCE = new Uninitialized ( ) ;
private Uninitialized ( ) {
super ( null ) ;
}
}
private ViewState ( ) {
}
public /* synthetic */ ViewState ( DefaultConstructorMarker defaultConstructorMarker ) {
this ( ) ;
}
}
public final /* synthetic */ class WhenMappings {
public static final /* synthetic */ int [ ] $EnumSwitchMapping$0 ;
public static final /* synthetic */ int [ ] $EnumSwitchMapping$1 ;
static {
StoreMediaSettings . SelfMuteFailure . values ( ) ;
int [ ] iArr = new int [ 1 ] ;
$EnumSwitchMapping$0 = iArr ;
iArr [ StoreMediaSettings . SelfMuteFailure . CANNOT_USE_VAD . ordinal ( ) ] = 1 ;
WidgetUserSheet . StreamPreviewClickBehavior . values ( ) ;
int [ ] iArr2 = new int [ 2 ] ;
$EnumSwitchMapping$1 = iArr2 ;
iArr2 [ WidgetUserSheet . StreamPreviewClickBehavior . TARGET_AND_LAUNCH_SPECTATE . ordinal ( ) ] = 1 ;
iArr2 [ WidgetUserSheet . StreamPreviewClickBehavior . TARGET_AND_DISMISS . ordinal ( ) ] = 2 ;
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
2021-11-23 19:35:19 +00:00
public WidgetUserSheetViewModel ( long j , long j2 , Long l , String str , boolean z2 , Observable < StoreState > observable , WidgetUserSheet . StreamPreviewClickBehavior streamPreviewClickBehavior , StoreMediaSettings storeMediaSettings , StoreApplicationStreaming storeApplicationStreaming , StoreUserNotes storeUserNotes , StoreUserProfile storeUserProfile , RestAPI restAPI , RestAPI restAPI2 , StoreApplicationStreamPreviews storeApplicationStreamPreviews , Parser < MessageRenderContext , Node < MessageRenderContext > , MessageParseState > parser ) {
2021-06-27 20:44:35 +00:00
super ( ViewState . Uninitialized . INSTANCE ) ;
m . checkNotNullParameter ( observable , " storeObservable " ) ;
m . checkNotNullParameter ( streamPreviewClickBehavior , " streamPreviewClickBehavior " ) ;
m . checkNotNullParameter ( storeMediaSettings , " storeMediaSettings " ) ;
m . checkNotNullParameter ( storeApplicationStreaming , " storeApplicationStreaming " ) ;
2021-07-09 21:07:36 +00:00
m . checkNotNullParameter ( storeUserNotes , " storeUserNotes " ) ;
2021-11-23 19:35:19 +00:00
m . checkNotNullParameter ( storeUserProfile , " storeUserProfile " ) ;
2021-06-27 20:44:35 +00:00
m . checkNotNullParameter ( restAPI , " restAPI " ) ;
m . checkNotNullParameter ( restAPI2 , " restAPISerializeNulls " ) ;
m . checkNotNullParameter ( storeApplicationStreamPreviews , " storeApplicationStreamPreviews " ) ;
m . checkNotNullParameter ( parser , " bioParser " ) ;
this . userId = j ;
this . channelId = j2 ;
2021-09-14 19:31:33 +00:00
this . guildId = l ;
2021-06-27 20:44:35 +00:00
this . friendToken = str ;
this . isVoiceContext = z2 ;
this . streamPreviewClickBehavior = streamPreviewClickBehavior ;
this . storeMediaSettings = storeMediaSettings ;
this . storeApplicationStreaming = storeApplicationStreaming ;
2021-07-09 21:07:36 +00:00
this . storeUserNotes = storeUserNotes ;
2021-11-23 19:35:19 +00:00
this . storeUserProfile = storeUserProfile ;
2021-06-27 20:44:35 +00:00
this . restAPI = restAPI ;
this . restAPISerializeNulls = restAPI2 ;
this . storeApplicationStreamPreviews = storeApplicationStreamPreviews ;
this . bioParser = parser ;
2021-10-26 23:51:06 +00:00
this . eventSubject = PublishSubject . k0 ( ) ;
2021-06-27 20:44:35 +00:00
this . fetchedPreviews = new LinkedHashSet ( ) ;
this . revealedBioIndices = new LinkedHashSet ( ) ;
ObservableExtensionsKt . appSubscribe$default ( ObservableExtensionsKt . ui$default ( ObservableExtensionsKt . computationLatest ( observable ) , this , null , 2 , null ) , WidgetUserSheetViewModel . class , ( Context ) null , ( Function1 ) null , ( Function1 ) null , ( Function0 ) null , ( Function0 ) null , new AnonymousClass1 ( this ) , 62 , ( Object ) null ) ;
storeUserNotes . loadNote ( j ) ;
2021-11-23 19:35:19 +00:00
StoreUserProfile . fetchProfile$default ( storeUserProfile , j , l , false , null , 12 , null ) ;
2021-06-27 20:44:35 +00:00
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
2021-11-23 19:35:19 +00:00
public /* synthetic */ WidgetUserSheetViewModel ( long j , long j2 , Long l , String str , boolean z2 , Observable observable , WidgetUserSheet . StreamPreviewClickBehavior streamPreviewClickBehavior , StoreMediaSettings storeMediaSettings , StoreApplicationStreaming storeApplicationStreaming , StoreUserNotes storeUserNotes , StoreUserProfile storeUserProfile , RestAPI restAPI , RestAPI restAPI2 , StoreApplicationStreamPreviews storeApplicationStreamPreviews , Parser parser , int i , DefaultConstructorMarker defaultConstructorMarker ) {
this ( j , j2 , l , str , z2 , ( i & 32 ) ! = 0 ? WidgetUserSheetViewModelStoreState . observeStoreState$default ( WidgetUserSheetViewModelStoreState . INSTANCE , j , Long . valueOf ( j2 ) , l , null , null , null , null , null , null , null , null , null , null , null , null , null , null , 131064 , null ) : observable , streamPreviewClickBehavior , ( i & 128 ) ! = 0 ? StoreStream . Companion . getMediaSettings ( ) : storeMediaSettings , ( i & 256 ) ! = 0 ? StoreStream . Companion . getApplicationStreaming ( ) : storeApplicationStreaming , ( i & 512 ) ! = 0 ? StoreStream . Companion . getUsersNotes ( ) : storeUserNotes , ( i & 1024 ) ! = 0 ? StoreStream . Companion . getUserProfile ( ) : storeUserProfile , ( i & 2048 ) ! = 0 ? RestAPI . Companion . getApi ( ) : restAPI , ( i & 4096 ) ! = 0 ? RestAPI . Companion . getApiSerializeNulls ( ) : restAPI2 , ( i & 8192 ) ! = 0 ? StoreStream . Companion . getApplicationStreamPreviews ( ) : storeApplicationStreamPreviews , ( i & 16384 ) ! = 0 ? DiscordParser . createParser$default ( false , false , false , 4 , null ) : parser ) ;
2021-06-27 20:44:35 +00:00
}
public static final /* synthetic */ void access$emitDismissSheetEvent ( WidgetUserSheetViewModel widgetUserSheetViewModel ) {
widgetUserSheetViewModel . emitDismissSheetEvent ( ) ;
}
public static final /* synthetic */ void access$emitLaunchVideoCallEvent ( WidgetUserSheetViewModel widgetUserSheetViewModel , long j ) {
widgetUserSheetViewModel . emitLaunchVideoCallEvent ( j ) ;
}
public static final /* synthetic */ void access$emitLaunchVoiceCallEvent ( WidgetUserSheetViewModel widgetUserSheetViewModel , long j ) {
widgetUserSheetViewModel . emitLaunchVoiceCallEvent ( j ) ;
}
public static final /* synthetic */ void access$emitShowFriendRequestAbortToast ( WidgetUserSheetViewModel widgetUserSheetViewModel , int i , String str ) {
widgetUserSheetViewModel . emitShowFriendRequestAbortToast ( i , str ) ;
}
public static final /* synthetic */ void access$emitShowToastEvent ( WidgetUserSheetViewModel widgetUserSheetViewModel , int i ) {
widgetUserSheetViewModel . emitShowToastEvent ( i ) ;
}
public static final /* synthetic */ ViewState access$getViewState$p ( WidgetUserSheetViewModel widgetUserSheetViewModel ) {
return widgetUserSheetViewModel . getViewState ( ) ;
}
public static final /* synthetic */ void access$handleStoreState ( WidgetUserSheetViewModel widgetUserSheetViewModel , StoreState storeState ) {
widgetUserSheetViewModel . handleStoreState ( storeState ) ;
}
public static final /* synthetic */ void access$updateViewState ( WidgetUserSheetViewModel widgetUserSheetViewModel , ViewState viewState ) {
widgetUserSheetViewModel . updateViewState ( viewState ) ;
}
2021-12-17 22:03:14 +00:00
private final UserProfileAdminView . ViewState createAdminViewState ( Channel channel , boolean z2 , boolean z3 , ManageUserContext manageUserContext , VoiceState voiceState , boolean z4 , boolean z5 ) {
boolean z6 ;
2021-06-27 20:44:35 +00:00
if ( channel = = null ) {
return null ;
}
2021-12-17 22:03:14 +00:00
boolean z7 = manageUserContext ! = null & & ( manageUserContext . getCanChangeNickname ( ) | | manageUserContext . getCanManageRoles ( ) ) ;
boolean z8 = ! ChannelUtils . w ( channel ) ? ! ( manageUserContext = = null | | ! manageUserContext . getCanKick ( ) ) : ! ( ChannelUtils . v ( channel ) | | ! z2 | | z3 ) ;
boolean z9 = z4 & & manageUserContext ! = null & & manageUserContext . getCanDisableCommunication ( ) & & ! z3 ;
2021-11-23 19:35:19 +00:00
boolean w = ChannelUtils . w ( channel ) ;
2021-12-17 22:03:14 +00:00
boolean z10 = manageUserContext ! = null & & manageUserContext . getCanBan ( ) ;
boolean z11 = voiceState ! = null & & manageUserContext ! = null & & manageUserContext . getCanMute ( ) & & ! ChannelUtils . z ( channel ) ;
boolean z12 = voiceState ! = null & & voiceState . e ( ) ;
boolean z13 = ( voiceState = = null | | manageUserContext = = null | | ! manageUserContext . getCanDeafen ( ) ) ? false : true ;
boolean z14 = voiceState ! = null & & voiceState . b ( ) ;
boolean z15 = ( voiceState = = null | | manageUserContext = = null | | ! manageUserContext . getCanMove ( ) ) ? false : true ;
2022-01-19 20:19:48 +00:00
Boolean [ ] boolArr = { Boolean . valueOf ( z7 ) , Boolean . valueOf ( z8 ) , Boolean . valueOf ( z10 ) , Boolean . valueOf ( z9 ) , Boolean . valueOf ( z11 ) , Boolean . valueOf ( z13 ) , Boolean . valueOf ( z15 ) } ;
2021-06-27 20:44:35 +00:00
int i = 0 ;
while ( true ) {
2022-01-19 20:19:48 +00:00
if ( i > = 7 ) {
2021-12-17 22:03:14 +00:00
z6 = false ;
2021-06-27 20:44:35 +00:00
break ;
} else if ( boolArr [ i ] . booleanValue ( ) ) {
2021-12-17 22:03:14 +00:00
z6 = true ;
2021-06-27 20:44:35 +00:00
break ;
} else {
i + + ;
}
}
2021-12-17 22:03:14 +00:00
return new UserProfileAdminView . ViewState ( z7 , z8 , z9 , w , z10 , z11 , z12 , z13 , z14 , z15 , z6 , z3 , z5 ) ;
2021-06-27 20:44:35 +00:00
}
2021-07-09 21:07:36 +00:00
private final List < Node < MessageRenderContext > > createAndProcessBioAstFromText ( String str ) {
if ( str = = null | | t . isBlank ( str ) ) {
return null ;
}
List < Node < MessageRenderContext > > generateAst = generateAst ( str ) ;
createMessagePreprocessor ( ) . process ( generateAst ) ;
return generateAst ;
}
2021-11-23 19:35:19 +00:00
private final UserProfileConnectionsView . ViewState createConnectionsViewState ( UserProfile userProfile , boolean z2 , boolean z3 ) {
2022-01-11 22:19:46 +00:00
List < ConnectedAccount > b2 = userProfile . b ( ) ;
ArrayList arrayList = new ArrayList ( d0 . t . o . collectionSizeOrDefault ( b2 , 10 ) ) ;
for ( ConnectedAccount connectedAccount : b2 ) {
2021-11-23 19:35:19 +00:00
arrayList . add ( new UserProfileConnectionsView . ConnectedAccountItem ( connectedAccount ) ) ;
2021-06-27 20:44:35 +00:00
}
boolean z4 = false ;
boolean z5 = ! z2 & & ! z3 ;
if ( z5 | | ( ! arrayList . isEmpty ( ) ) ) {
z4 = true ;
}
return new UserProfileConnectionsView . ViewState ( z4 , z5 , arrayList ) ;
}
private final MessagePreprocessor createMessagePreprocessor ( ) {
return new MessagePreprocessor ( - 1 , this . revealedBioIndices , null , false , null , 28 , null ) ;
}
private final Observable < Channel > createPrivateChannelWithUser ( long j ) {
return this . restAPI . createOrFetchDM ( j ) ;
}
public static /* synthetic */ void disconnectUser$default ( WidgetUserSheetViewModel widgetUserSheetViewModel , Channel channel , int i , Object obj ) {
if ( ( i & 1 ) ! = 0 ) {
channel = null ;
}
widgetUserSheetViewModel . disconnectUser ( channel ) ;
}
private final void emitDismissSheetEvent ( ) {
PublishSubject < Event > publishSubject = this . eventSubject ;
2021-12-17 22:03:14 +00:00
publishSubject . k . onNext ( Event . DismissSheet . INSTANCE ) ;
2021-06-27 20:44:35 +00:00
}
private final void emitLaunchSpectateEvent ( ModelApplicationStream modelApplicationStream ) {
PublishSubject < Event > publishSubject = this . eventSubject ;
2021-12-17 22:03:14 +00:00
publishSubject . k . onNext ( new Event . LaunchSpectate ( modelApplicationStream ) ) ;
2021-06-27 20:44:35 +00:00
}
private final void emitLaunchVideoCallEvent ( long j ) {
PublishSubject < Event > publishSubject = this . eventSubject ;
2021-12-17 22:03:14 +00:00
publishSubject . k . onNext ( new Event . LaunchVideoCall ( j ) ) ;
2021-06-27 20:44:35 +00:00
}
private final void emitLaunchVoiceCallEvent ( long j ) {
PublishSubject < Event > publishSubject = this . eventSubject ;
2021-12-17 22:03:14 +00:00
publishSubject . k . onNext ( new Event . LaunchVoiceCall ( j ) ) ;
2021-06-27 20:44:35 +00:00
}
private final void emitRequestStreamPermissionsEvent ( ModelApplicationStream modelApplicationStream ) {
PublishSubject < Event > publishSubject = this . eventSubject ;
2021-12-17 22:03:14 +00:00
publishSubject . k . onNext ( new Event . RequestPermissionsForSpectateStream ( modelApplicationStream ) ) ;
2021-06-27 20:44:35 +00:00
}
private final void emitShowFriendRequestAbortToast ( int i , String str ) {
PublishSubject < Event > publishSubject = this . eventSubject ;
2021-12-17 22:03:14 +00:00
publishSubject . k . onNext ( new Event . ShowFriendRequestErrorToast ( i , str ) ) ;
2021-06-27 20:44:35 +00:00
}
private final void emitShowToastEvent ( @StringRes int i ) {
PublishSubject < Event > publishSubject = this . eventSubject ;
2021-12-17 22:03:14 +00:00
publishSubject . k . onNext ( new Event . ShowToast ( i ) ) ;
2021-06-27 20:44:35 +00:00
}
private final List < Node < MessageRenderContext > > generateAst ( CharSequence charSequence ) {
return Parser . parse$default ( this . bioParser , charSequence , MessageParseState . Companion . getInitialState ( ) , null , 4 , null ) ;
}
2021-11-23 19:35:19 +00:00
/ * JADX WARNING : Code restructure failed : missing block : B : 19 : 0x008e , code lost :
2021-12-17 22:03:14 +00:00
if ( r3 ! = null ) goto L_0x0095 ;
2021-06-27 20:44:35 +00:00
* /
2021-12-21 23:37:30 +00:00
/* JADX WARNING: Removed duplicated region for block: B:105:0x0254 */
/* JADX WARNING: Removed duplicated region for block: B:112:0x026b */
/* JADX WARNING: Removed duplicated region for block: B:115:0x0270 */
/* JADX WARNING: Removed duplicated region for block: B:121:0x0284 */
/* JADX WARNING: Removed duplicated region for block: B:124:0x0289 */
/* JADX WARNING: Removed duplicated region for block: B:125:0x028e */
/* JADX WARNING: Removed duplicated region for block: B:128:0x0293 */
/* JADX WARNING: Removed duplicated region for block: B:134:0x02a6 */
/* JADX WARNING: Removed duplicated region for block: B:142:0x02b8 A[ADDED_TO_REGION] */
/* JADX WARNING: Removed duplicated region for block: B:146:0x02c2 */
/* JADX WARNING: Removed duplicated region for block: B:149:0x02cd */
/* JADX WARNING: Removed duplicated region for block: B:150:0x02d2 */
/* JADX WARNING: Removed duplicated region for block: B:153:0x02d7 */
/* JADX WARNING: Removed duplicated region for block: B:154:0x02dc */
/* JADX WARNING: Removed duplicated region for block: B:88:0x0213 */
/* JADX WARNING: Removed duplicated region for block: B:98:0x023d */
2021-06-27 20:44:35 +00:00
private final void handleStoreState ( StoreState storeState ) {
List list ;
boolean z2 ;
2021-11-30 23:47:08 +00:00
boolean z3 ;
2021-12-17 22:03:14 +00:00
String str ;
Float f ;
2021-11-30 23:47:08 +00:00
boolean z4 ;
2021-12-17 22:03:14 +00:00
boolean z5 ;
2021-07-13 20:48:29 +00:00
User user ;
2021-11-23 19:35:19 +00:00
List < Node < MessageRenderContext > > createAndProcessBioAstFromText ;
2021-07-09 21:07:36 +00:00
StoreUserNotes . UserNoteState userNoteFetchState ;
String note ;
2021-07-27 04:36:47 +00:00
ViewState viewState ;
2021-12-17 22:03:14 +00:00
boolean z6 ;
2021-07-09 21:07:36 +00:00
ModelUserNote note2 ;
2021-11-23 19:35:19 +00:00
String bio ;
2021-07-13 20:48:29 +00:00
User merge ;
2021-07-09 21:07:36 +00:00
ModelApplicationStream stream ;
2021-09-14 19:31:33 +00:00
String name ;
2021-06-27 20:44:35 +00:00
List < Long > roles ;
if ( storeState = = null ) {
2021-12-17 22:03:14 +00:00
this . eventSubject . k . onNext ( Event . UserNotFound . INSTANCE ) ;
2021-06-27 20:44:35 +00:00
return ;
}
2021-07-13 20:48:29 +00:00
User user2 = storeState . getUser ( ) ;
2021-06-27 20:44:35 +00:00
MeUser me2 = storeState . getMe ( ) ;
Channel channel = storeState . getChannel ( ) ;
Map < Long , GuildMember > computedMembers = storeState . getComputedMembers ( ) ;
Map < Long , GuildRole > guildRoles = storeState . getGuildRoles ( ) ;
Guild guild = storeState . getGuild ( ) ;
2021-12-17 22:03:14 +00:00
boolean z7 = false ;
boolean z8 = me2 . getId ( ) = = user2 . getId ( ) ;
2021-07-13 20:48:29 +00:00
boolean isSystemUser = user2 . isSystemUser ( ) ;
2021-09-14 19:31:33 +00:00
GuildMember guildMember = ( GuildMember ) a . e ( user2 , computedMembers ) ;
2021-06-27 20:44:35 +00:00
GuildMember guildMember2 = computedMembers . get ( Long . valueOf ( me2 . getId ( ) ) ) ;
if ( ! ( guildMember = = null | | ( roles = guildMember . getRoles ( ) ) = = null ) ) {
ArrayList arrayList = new ArrayList ( ) ;
for ( Number number : roles ) {
GuildRole guildRole = guildRoles . get ( Long . valueOf ( number . longValue ( ) ) ) ;
if ( guildRole ! = null ) {
arrayList . add ( guildRole ) ;
}
}
list = u . sortedWith ( arrayList , RoleUtils . getROLE_COMPARATOR ( ) ) ;
}
list = n . emptyList ( ) ;
2021-11-23 19:35:19 +00:00
ManageUserContext from = ( guildMember = = null | | guildMember2 = = null | | guild = = null ) ? null : ManageUserContext . Companion . from ( guild , me2 , user2 , guildMember2 . getRoles ( ) , guildMember . getRoles ( ) , storeState . getPermissions ( ) , guildRoles ) ;
2021-12-17 22:03:14 +00:00
boolean isCommunicationDisabled = guildMember ! = null ? guildMember . isCommunicationDisabled ( ) : false ;
boolean z9 = channel ! = null & & channel . q ( ) = = me2 . getId ( ) ;
2021-06-27 20:44:35 +00:00
int type = ModelUserRelationship . getType ( storeState . getUserRelationshipType ( ) ) ;
2021-09-14 19:31:33 +00:00
VoiceState voiceState = ( VoiceState ) a . e ( user2 , storeState . getMySelectedVoiceChannelVoiceStates ( ) ) ;
2021-06-27 20:44:35 +00:00
VoiceState voiceState2 = storeState . getMySelectedVoiceChannelVoiceStates ( ) . get ( Long . valueOf ( me2 . getId ( ) ) ) ;
boolean isInSameVoiceChannel = isInSameVoiceChannel ( voiceState2 , voiceState ) ;
2021-12-17 22:03:14 +00:00
boolean z10 = this . isVoiceContext | | isInSameVoiceChannel ;
boolean selfMuted = z8 ? storeState . getSelfMuted ( ) : storeState . getMuted ( ) ;
Boolean valueOf = z8 ? Boolean . valueOf ( storeState . getSelfDeafened ( ) ) : null ;
if ( ! z8 ) {
z3 = isSystemUser ;
z2 = z10 ;
str = null ;
2021-11-23 19:35:19 +00:00
f = Float . valueOf ( PerceptualVolumeUtils . amplitudeToPerceptual$default ( PerceptualVolumeUtils . INSTANCE , storeState . getOutputVolume ( ) , 0 . 0f , 2 , null ) ) ;
2021-06-27 20:44:35 +00:00
} else {
2021-12-17 22:03:14 +00:00
z3 = isSystemUser ;
z2 = z10 ;
str = null ;
2021-11-23 19:35:19 +00:00
f = null ;
2021-06-27 20:44:35 +00:00
}
2021-07-27 04:36:47 +00:00
UserProfileVoiceSettingsView . ViewState viewState2 = new UserProfileVoiceSettingsView . ViewState ( selfMuted , valueOf , f ) ;
2021-09-14 19:31:33 +00:00
VoiceState voiceState3 = ( VoiceState ) a . e ( user2 , storeState . getCurrentChannelVoiceStates ( ) ) ;
2021-12-17 22:03:14 +00:00
if ( channel ! = null & & ChannelUtils . w ( channel ) ) {
str = ChannelUtils . c ( channel ) ;
}
String str2 = ( guild = = null | | ( name = guild . getName ( ) ) = = null ) ? str : name ;
UserProfileAdminView . ViewState createAdminViewState = createAdminViewState ( channel , z9 , z8 , from , voiceState3 , storeState . getCanDisableCommunication ( ) , isCommunicationDisabled ) ;
2021-11-23 19:35:19 +00:00
UserProfile userProfile = storeState . getUserProfile ( ) ;
2021-12-17 22:03:14 +00:00
UserProfileConnectionsView . ViewState createConnectionsViewState = createConnectionsViewState ( userProfile , z8 , z3 ) ;
2021-09-14 19:31:33 +00:00
StreamContext streamContext = storeState . getStreamContext ( ) ;
String encodedStreamKey = ( streamContext = = null | | ( stream = streamContext . getStream ( ) ) = = null ) ? null : stream . getEncodedStreamKey ( ) ;
if ( encodedStreamKey ! = null & & ! this . fetchedPreviews . contains ( encodedStreamKey ) ) {
this . storeApplicationStreamPreviews . fetchStreamPreviewIfNotFetching ( streamContext ) ;
this . fetchedPreviews . add ( encodedStreamKey ) ;
}
2021-12-17 22:03:14 +00:00
UserProfileStageActionsView . ViewState viewState3 = new UserProfileStageActionsView . ViewState ( z8 , storeState . getStageChannel ( ) , storeState . m54getUserStageRolestwRsX0 ( ) , storeState . getUserRequestToSpeakState ( ) , isInSameVoiceChannel ( voiceState2 , voiceState ) , PermissionUtils . can ( Permission . MUTE_MEMBERS , storeState . getPermissions ( ) ) , false , false , 192 , null ) ;
2021-12-21 23:37:30 +00:00
Long l = this . guildId ;
if ( l ! = null & & ( l = = null | | l . longValue ( ) ! = 0 ) ) {
2021-11-30 23:47:08 +00:00
if ( ( guildMember ! = null ? guildMember . getBio ( ) : null ) = = null ) {
2021-12-17 22:03:14 +00:00
z4 = false ;
z5 = ! ( m . areEqual ( userProfile , StoreUserProfile . Companion . getEMPTY_PROFILE ( ) ) ^ true ) & & z4 ;
if ( z5 ) {
2021-11-30 23:47:08 +00:00
if ( user2 instanceof MeUser ) {
2022-01-11 22:19:46 +00:00
merge = MeUser . Companion . merge ( ( MeUser ) user2 , userProfile . g ( ) ) ;
2021-11-30 23:47:08 +00:00
} else if ( user2 instanceof CoreUser ) {
2022-01-11 22:19:46 +00:00
merge = CoreUser . Companion . merge ( ( CoreUser ) user2 , userProfile . g ( ) ) ;
2021-11-30 23:47:08 +00:00
}
user = merge ;
createAndProcessBioAstFromText = ( guildMember ! = null | | ( bio = guildMember . getBio ( ) ) = = null | | ! ( t . isBlank ( bio ) ^ true ) ) ? null : createAndProcessBioAstFromText ( bio ) ;
if ( createAndProcessBioAstFromText = = null ) {
String bio2 = user . getBio ( ) ;
2021-12-17 22:03:14 +00:00
createAndProcessBioAstFromText = bio2 ! = null ? createAndProcessBioAstFromText ( bio2 ) : null ;
2021-11-30 23:47:08 +00:00
}
2021-11-23 19:35:19 +00:00
userNoteFetchState = storeState . getUserNoteFetchState ( ) ;
if ( ! ( userNoteFetchState instanceof StoreUserNotes . UserNoteState . Loaded ) ) {
2021-12-17 22:03:14 +00:00
userNoteFetchState = null ;
2021-11-23 19:35:19 +00:00
}
StoreUserNotes . UserNoteState . Loaded loaded = ( StoreUserNotes . UserNoteState . Loaded ) userNoteFetchState ;
2021-12-17 22:03:14 +00:00
note = ( loaded ! = null | | ( note2 = loaded . getNote ( ) ) = = null ) ? null : note2 . getNote ( ) ;
2021-11-23 19:35:19 +00:00
viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
2021-12-17 22:03:14 +00:00
viewState = null ;
2021-11-23 19:35:19 +00:00
}
ViewState . Loaded loaded2 = ( ViewState . Loaded ) viewState ;
2021-12-17 22:03:14 +00:00
z6 = ! ( ( loaded2 ! = null ? loaded2 . getUserNoteFetchState ( ) : null ) instanceof StoreUserNotes . UserNoteState . Loading ) & & ! ( storeState . getUserNoteFetchState ( ) instanceof StoreUserNotes . UserNoteState . Loading ) ;
2021-11-23 19:35:19 +00:00
if ( getViewState ( ) instanceof ViewState . Uninitialized ) {
2021-12-17 22:03:14 +00:00
if ( ! ( note = = null | | note . length ( ) = = 0 ) ) {
z7 = true ;
}
2021-11-23 19:35:19 +00:00
}
2021-12-17 22:03:14 +00:00
if ( z6 & & ! z7 ) {
note = null ;
} else if ( note = = null ) {
note = " " ;
2021-11-30 23:47:08 +00:00
}
2022-01-11 22:19:46 +00:00
updateViewState ( new ViewState . Loaded ( user , z8 , z2 , viewState2 , voiceState3 , storeState . getRichPresence ( ) , str2 , list , createAdminViewState , viewState3 , channel , streamContext , guild ! = null ? guild . getName ( ) : null , guild ! = null ? guild . getIcon ( ) : null , type , createConnectionsViewState , storeState . getUserNoteFetchState ( ) , note , isInSameVoiceChannel , createAndProcessBioAstFromText , z5 , this . guildId , guildMember , storeState . getUserProfile ( ) ) ) ;
2021-11-23 19:35:19 +00:00
this . mostRecentStoreState = storeState ;
}
2021-11-30 23:47:08 +00:00
user = user2 ;
if ( guildMember ! = null ) {
}
if ( createAndProcessBioAstFromText = = null ) {
}
userNoteFetchState = storeState . getUserNoteFetchState ( ) ;
if ( ! ( userNoteFetchState instanceof StoreUserNotes . UserNoteState . Loaded ) ) {
}
StoreUserNotes . UserNoteState . Loaded loaded = ( StoreUserNotes . UserNoteState . Loaded ) userNoteFetchState ;
if ( loaded ! = null ) {
}
viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
}
ViewState . Loaded loaded2 = ( ViewState . Loaded ) viewState ;
2021-12-17 22:03:14 +00:00
if ( ! ( ( loaded2 ! = null ? loaded2 . getUserNoteFetchState ( ) : null ) instanceof StoreUserNotes . UserNoteState . Loading ) ) {
2021-11-30 23:47:08 +00:00
}
if ( getViewState ( ) instanceof ViewState . Uninitialized ) {
}
2021-12-17 22:03:14 +00:00
if ( z6 ) {
2021-11-30 23:47:08 +00:00
}
if ( note = = null ) {
}
2022-01-11 22:19:46 +00:00
updateViewState ( new ViewState . Loaded ( user , z8 , z2 , viewState2 , voiceState3 , storeState . getRichPresence ( ) , str2 , list , createAdminViewState , viewState3 , channel , streamContext , guild ! = null ? guild . getName ( ) : null , guild ! = null ? guild . getIcon ( ) : null , type , createConnectionsViewState , storeState . getUserNoteFetchState ( ) , note , isInSameVoiceChannel , createAndProcessBioAstFromText , z5 , this . guildId , guildMember , storeState . getUserProfile ( ) ) ) ;
2021-11-30 23:47:08 +00:00
this . mostRecentStoreState = storeState ;
2021-11-23 19:35:19 +00:00
}
2021-11-30 23:47:08 +00:00
}
2021-12-17 22:03:14 +00:00
z4 = true ;
2021-11-30 23:47:08 +00:00
if ( ! ( m . areEqual ( userProfile , StoreUserProfile . Companion . getEMPTY_PROFILE ( ) ) ^ true ) ) {
}
2021-12-17 22:03:14 +00:00
if ( z5 ) {
2021-06-27 20:44:35 +00:00
}
2021-07-13 20:48:29 +00:00
user = user2 ;
2021-11-23 19:35:19 +00:00
if ( guildMember ! = null ) {
}
if ( createAndProcessBioAstFromText = = null ) {
2021-07-09 21:07:36 +00:00
}
userNoteFetchState = storeState . getUserNoteFetchState ( ) ;
if ( ! ( userNoteFetchState instanceof StoreUserNotes . UserNoteState . Loaded ) ) {
}
2021-07-27 04:36:47 +00:00
StoreUserNotes . UserNoteState . Loaded loaded = ( StoreUserNotes . UserNoteState . Loaded ) userNoteFetchState ;
if ( loaded ! = null ) {
2021-07-09 21:07:36 +00:00
}
2021-07-27 04:36:47 +00:00
viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
2021-06-27 20:44:35 +00:00
}
2021-07-27 04:36:47 +00:00
ViewState . Loaded loaded2 = ( ViewState . Loaded ) viewState ;
2021-12-17 22:03:14 +00:00
if ( ! ( ( loaded2 ! = null ? loaded2 . getUserNoteFetchState ( ) : null ) instanceof StoreUserNotes . UserNoteState . Loading ) ) {
2021-07-09 21:07:36 +00:00
}
2021-07-27 04:36:47 +00:00
if ( getViewState ( ) instanceof ViewState . Uninitialized ) {
2021-07-09 21:07:36 +00:00
}
2021-12-17 22:03:14 +00:00
if ( z6 ) {
2021-07-09 21:07:36 +00:00
}
2021-07-27 04:36:47 +00:00
if ( note = = null ) {
2021-07-09 21:07:36 +00:00
}
2022-01-11 22:19:46 +00:00
updateViewState ( new ViewState . Loaded ( user , z8 , z2 , viewState2 , voiceState3 , storeState . getRichPresence ( ) , str2 , list , createAdminViewState , viewState3 , channel , streamContext , guild ! = null ? guild . getName ( ) : null , guild ! = null ? guild . getIcon ( ) : null , type , createConnectionsViewState , storeState . getUserNoteFetchState ( ) , note , isInSameVoiceChannel , createAndProcessBioAstFromText , z5 , this . guildId , guildMember , storeState . getUserProfile ( ) ) ) ;
2021-06-27 20:44:35 +00:00
this . mostRecentStoreState = storeState ;
}
private final boolean isInSameVoiceChannel ( VoiceState voiceState , VoiceState voiceState2 ) {
Long l = null ;
Long a = voiceState2 ! = null ? voiceState2 . a ( ) : null ;
if ( voiceState ! = null ) {
l = voiceState . a ( ) ;
}
if ( a = = null | | l = = null ) {
return false ;
}
return m . areEqual ( a , l ) ;
}
public final void addRelationship ( Integer num , String str , @StringRes int i ) {
m . checkNotNullParameter ( str , " username " ) ;
ObservableExtensionsKt . appSubscribe$default ( ObservableExtensionsKt . ui$default ( ObservableExtensionsKt . restSubscribeOn$default ( this . restAPI . addRelationship ( " User Profile " , this . userId , num , this . friendToken ) , false , 1 , null ) , this , null , 2 , null ) , WidgetUserSheetViewModel . class , ( Context ) null , ( Function1 ) null , new WidgetUserSheetViewModel$addRelationship$2 ( this , str ) , ( Function0 ) null , ( Function0 ) null , new WidgetUserSheetViewModel$addRelationship$1 ( this , i ) , 54 , ( Object ) null ) ;
}
public final void banUser ( ) {
Channel channel ;
ViewState viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
viewState = null ;
}
ViewState . Loaded loaded = ( ViewState . Loaded ) viewState ;
if ( loaded ! = null & & ( channel = loaded . getChannel ( ) ) ! = null ) {
User user = loaded . getUser ( ) ;
2021-12-17 22:03:14 +00:00
this . eventSubject . k . onNext ( new Event . LaunchBanUser ( user . getUsername ( ) , channel . f ( ) , user . getId ( ) ) ) ;
}
}
public final void disableCommunication ( ) {
Channel channel ;
ViewState viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
viewState = null ;
}
ViewState . Loaded loaded = ( ViewState . Loaded ) viewState ;
if ( loaded ! = null & & ( channel = loaded . getChannel ( ) ) ! = null ) {
User user = loaded . getUser ( ) ;
GuildMember guildMember = loaded . getGuildMember ( ) ;
if ( guildMember ! = null ? guildMember . isCommunicationDisabled ( ) : false ) {
this . eventSubject . k . onNext ( new Event . LaunchEnableCommunication ( user . getId ( ) , channel . f ( ) ) ) ;
} else {
this . eventSubject . k . onNext ( new Event . LaunchDisableCommunication ( user . getId ( ) , channel . f ( ) ) ) ;
}
2021-06-27 20:44:35 +00:00
}
}
public final void disconnectUser ( Channel channel ) {
ViewState viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
viewState = null ;
}
ViewState . Loaded loaded = ( ViewState . Loaded ) viewState ;
if ( loaded ! = null ) {
if ( channel = = null ) {
channel = loaded . getChannel ( ) ;
}
if ( channel ! = null ) {
2021-07-13 20:48:29 +00:00
ObservableExtensionsKt . appSubscribe$default ( ObservableExtensionsKt . ui$default ( ObservableExtensionsKt . restSubscribeOn$default ( this . restAPISerializeNulls . disconnectGuildMember ( channel . f ( ) , loaded . getUser ( ) . getId ( ) , new RestAPIParams . GuildMemberDisconnect ( null , 1 , null ) ) , false , 1 , null ) , this , null , 2 , null ) , WidgetUserSheetViewModel . class , ( Context ) null , ( Function1 ) null , new WidgetUserSheetViewModel$disconnectUser$2 ( this ) , ( Function0 ) null , ( Function0 ) null , new WidgetUserSheetViewModel$disconnectUser$1 ( this ) , 54 , ( Object ) null ) ;
2021-06-27 20:44:35 +00:00
}
}
}
public final void editMember ( ) {
Channel channel ;
ViewState viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
viewState = null ;
}
ViewState . Loaded loaded = ( ViewState . Loaded ) viewState ;
if ( loaded ! = null & & ( channel = loaded . getChannel ( ) ) ! = null ) {
2021-12-17 22:03:14 +00:00
this . eventSubject . k . onNext ( new Event . LaunchEditMember ( channel . f ( ) , this . userId ) ) ;
2021-06-27 20:44:35 +00:00
}
}
2021-07-13 20:48:29 +00:00
public final boolean getOpenPopoutLogged ( ) {
return this . openPopoutLogged ;
}
2021-06-27 20:44:35 +00:00
public final void guildDeafenUser ( ) {
ViewState viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
viewState = null ;
}
ViewState . Loaded loaded = ( ViewState . Loaded ) viewState ;
if ( loaded ! = null ) {
Channel channel = loaded . getChannel ( ) ;
User user = loaded . getUser ( ) ;
UserProfileAdminView . ViewState adminViewState = loaded . getAdminViewState ( ) ;
if ( channel ! = null & & adminViewState ! = null ) {
2021-07-13 20:48:29 +00:00
ObservableExtensionsKt . appSubscribe$default ( ObservableExtensionsKt . ui$default ( ObservableExtensionsKt . restSubscribeOn$default ( this . restAPI . changeGuildMember ( channel . f ( ) , user . getId ( ) , RestAPIParams . GuildMember . Companion . createWithDeaf ( ! adminViewState . isServerDeafened ( ) ) ) , false , 1 , null ) , this , null , 2 , null ) , WidgetUserSheetViewModel . class , ( Context ) null , ( Function1 ) null , new WidgetUserSheetViewModel$guildDeafenUser$2 ( this ) , ( Function0 ) null , ( Function0 ) null , WidgetUserSheetViewModel$guildDeafenUser$1 . INSTANCE , 54 , ( Object ) null ) ;
2021-06-27 20:44:35 +00:00
}
}
}
public final void guildMoveForUser ( ) {
Channel channel ;
ViewState viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
viewState = null ;
}
ViewState . Loaded loaded = ( ViewState . Loaded ) viewState ;
if ( loaded ! = null & & ( channel = loaded . getChannel ( ) ) ! = null ) {
2021-12-17 22:03:14 +00:00
this . eventSubject . k . onNext ( new Event . LaunchMoveUser ( channel . f ( ) ) ) ;
2021-06-27 20:44:35 +00:00
}
}
public final void guildMuteUser ( ) {
ViewState viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
viewState = null ;
}
ViewState . Loaded loaded = ( ViewState . Loaded ) viewState ;
if ( loaded ! = null ) {
Channel channel = loaded . getChannel ( ) ;
UserProfileAdminView . ViewState adminViewState = loaded . getAdminViewState ( ) ;
User user = loaded . getUser ( ) ;
if ( channel ! = null & & adminViewState ! = null ) {
2021-07-13 20:48:29 +00:00
ObservableExtensionsKt . appSubscribe$default ( ObservableExtensionsKt . ui$default ( ObservableExtensionsKt . restSubscribeOn$default ( this . restAPI . changeGuildMember ( channel . f ( ) , user . getId ( ) , RestAPIParams . GuildMember . Companion . createWithMute ( ! loaded . getAdminViewState ( ) . isServerMuted ( ) ) ) , false , 1 , null ) , this , null , 2 , null ) , WidgetUserSheetViewModel . class , ( Context ) null , ( Function1 ) null , new WidgetUserSheetViewModel$guildMuteUser$2 ( this ) , ( Function0 ) null , ( Function0 ) null , WidgetUserSheetViewModel$guildMuteUser$1 . INSTANCE , 54 , ( Object ) null ) ;
2021-06-27 20:44:35 +00:00
}
}
}
@MainThread
public final void handleBioIndexClicked ( SpoilerNode < ? > spoilerNode ) {
StoreState storeState ;
2021-11-23 19:35:19 +00:00
UserProfile userProfile ;
2022-01-11 22:19:46 +00:00
com . discord . api . user . User g ;
2021-07-13 20:48:29 +00:00
NullSerializable < String > d ;
String a ;
2021-06-27 20:44:35 +00:00
m . checkNotNullParameter ( spoilerNode , " spoilerNode " ) ;
ViewState viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
viewState = null ;
}
ViewState . Loaded loaded = ( ViewState . Loaded ) viewState ;
2022-01-11 22:19:46 +00:00
if ( loaded ! = null & & ( storeState = this . mostRecentStoreState ) ! = null & & ( userProfile = storeState . getUserProfile ( ) ) ! = null & & ( g = userProfile . g ( ) ) ! = null & & ( d = g . d ( ) ) ! = null & & ( a = d . a ( ) ) ! = null ) {
2021-06-27 20:44:35 +00:00
this . revealedBioIndices . add ( Integer . valueOf ( spoilerNode . getId ( ) ) ) ;
2022-01-11 22:19:46 +00:00
updateViewState ( ViewState . Loaded . copy$default ( loaded , null , false , false , null , null , null , null , null , null , null , null , null , null , null , 0 , null , null , null , false , createAndProcessBioAstFromText ( a ) , false , null , null , null , 16252927 , null ) ) ;
2021-06-27 20:44:35 +00:00
}
}
public final void inviteUserToSpeak ( ) {
Channel channel ;
ViewState viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
viewState = null ;
}
ViewState . Loaded loaded = ( ViewState . Loaded ) viewState ;
if ( loaded ! = null & & ( channel = loaded . getStageViewState ( ) . getChannel ( ) ) ! = null ) {
long id2 = loaded . getUser ( ) . getId ( ) ;
2022-01-11 22:19:46 +00:00
updateViewState ( ViewState . Loaded . copy$default ( loaded , null , false , false , null , null , null , null , null , null , UserProfileStageActionsView . ViewState . m45copyam1GJgw$default ( loaded . getStageViewState ( ) , false , null , null , null , false , false , false , true , 127 , null ) , null , null , null , null , 0 , null , null , null , false , null , false , null , null , null , 16776703 , null ) ) ;
2021-06-27 20:44:35 +00:00
ObservableExtensionsKt . appSubscribe$default ( ObservableExtensionsKt . ui$default ( ObservableExtensionsKt . restSubscribeOn$default ( StageChannelAPI . setUserSuppressedInChannel$default ( StageChannelAPI . INSTANCE , channel , id2 , false , 0 , 8 , null ) , false , 1 , null ) , this , null , 2 , null ) , WidgetUserSheetViewModel . class , ( Context ) null , ( Function1 ) null , ( Function1 ) null , ( Function0 ) null , ( Function0 ) null , new WidgetUserSheetViewModel$inviteUserToSpeak$1 ( this ) , 62 , ( Object ) null ) ;
}
}
public final void kickUser ( ) {
Channel channel ;
ViewState viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
viewState = null ;
}
ViewState . Loaded loaded = ( ViewState . Loaded ) viewState ;
if ( loaded ! = null & & ( channel = loaded . getChannel ( ) ) ! = null ) {
User user = loaded . getUser ( ) ;
2021-11-23 19:35:19 +00:00
if ( ChannelUtils . w ( channel ) ) {
2021-07-13 20:48:29 +00:00
ObservableExtensionsKt . appSubscribe$default ( ObservableExtensionsKt . ui$default ( ObservableExtensionsKt . takeSingleUntilTimeout$default ( ObservableExtensionsKt . restSubscribeOn$default ( RestAPI . Companion . getApi ( ) . removeChannelRecipient ( channel . h ( ) , user . getId ( ) ) , false , 1 , null ) , 0 , false , 1 , null ) , this , null , 2 , null ) , ( Context ) null , " REST: remove group member " , ( Function1 ) null , new WidgetUserSheetViewModel$kickUser$1 ( this ) , ( Function1 ) null , ( Function0 ) null , ( Function0 ) null , 117 , ( Object ) null ) ;
2021-06-27 20:44:35 +00:00
return ;
}
2021-12-17 22:03:14 +00:00
this . eventSubject . k . onNext ( new Event . LaunchKickUser ( user . getUsername ( ) , channel . f ( ) , user . getId ( ) ) ) ;
2021-06-27 20:44:35 +00:00
}
}
public final void launchVideoCall ( ) {
ObservableExtensionsKt . appSubscribe$default ( ObservableExtensionsKt . ui$default ( ObservableExtensionsKt . restSubscribeOn$default ( createPrivateChannelWithUser ( this . userId ) , false , 1 , null ) , this , null , 2 , null ) , WidgetUserSheetViewModel . class , ( Context ) null , ( Function1 ) null , new WidgetUserSheetViewModel$launchVideoCall$2 ( this ) , ( Function0 ) null , ( Function0 ) null , new WidgetUserSheetViewModel$launchVideoCall$1 ( this ) , 54 , ( Object ) null ) ;
}
public final void launchVoiceCall ( ) {
ObservableExtensionsKt . appSubscribe$default ( ObservableExtensionsKt . ui$default ( ObservableExtensionsKt . restSubscribeOn$default ( createPrivateChannelWithUser ( this . userId ) , false , 1 , null ) , this , null , 2 , null ) , WidgetUserSheetViewModel . class , ( Context ) null , ( Function1 ) null , new WidgetUserSheetViewModel$launchVoiceCall$2 ( this ) , ( Function0 ) null , ( Function0 ) null , new WidgetUserSheetViewModel$launchVoiceCall$1 ( this ) , 54 , ( Object ) null ) ;
}
public final void moveUserToChannel ( long j ) {
ViewState viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
viewState = null ;
}
ViewState . Loaded loaded = ( ViewState . Loaded ) viewState ;
if ( loaded ! = null ) {
Channel channel = loaded . getChannel ( ) ;
User user = loaded . getUser ( ) ;
if ( channel ! = null ) {
2021-07-13 20:48:29 +00:00
ObservableExtensionsKt . appSubscribe$default ( ObservableExtensionsKt . ui$default ( ObservableExtensionsKt . restSubscribeOn$default ( this . restAPI . changeGuildMember ( channel . f ( ) , user . getId ( ) , RestAPIParams . GuildMember . Companion . createWithChannelId ( j ) ) , false , 1 , null ) , this , null , 2 , null ) , WidgetUserSheetViewModel . class , ( Context ) null , ( Function1 ) null , new WidgetUserSheetViewModel$moveUserToChannel$2 ( this ) , ( Function0 ) null , ( Function0 ) null , new WidgetUserSheetViewModel$moveUserToChannel$1 ( this ) , 54 , ( Object ) null ) ;
2021-06-27 20:44:35 +00:00
}
}
}
public final Observable < Event > observeEvents ( ) {
PublishSubject < Event > publishSubject = this . eventSubject ;
m . checkNotNullExpressionValue ( publishSubject , " eventSubject " ) ;
return publishSubject ;
}
public final void onActivityCustomButtonClicked ( Context context , long j , String str , long j2 , int i ) {
m . checkNotNullParameter ( context , " applicationContext " ) ;
m . checkNotNullParameter ( str , " sessionId " ) ;
ObservableExtensionsKt . appSubscribe$default ( ObservableExtensionsKt . ui$default ( ObservableExtensionsKt . restSubscribeOn$default ( this . restAPI . getActivityMetadata ( j , str , j2 ) , false , 1 , null ) , this , null , 2 , null ) , ( Context ) null , " REST: Custom Button GetActivityMetadata " , ( Function1 ) null , new WidgetUserSheetViewModel$onActivityCustomButtonClicked$1 ( i , context ) , ( Function1 ) null , ( Function0 ) null , ( Function0 ) null , 117 , ( Object ) null ) ;
}
@MainThread
public final void onSpectatePermissionsGranted ( ModelApplicationStream modelApplicationStream ) {
m . checkNotNullParameter ( modelApplicationStream , " stream " ) ;
StoreApplicationStreaming . targetStream$default ( this . storeApplicationStreaming , modelApplicationStream . getEncodedStreamKey ( ) , false , 2 , null ) ;
int ordinal = this . streamPreviewClickBehavior . ordinal ( ) ;
if ( ordinal = = 0 ) {
emitLaunchSpectateEvent ( modelApplicationStream ) ;
} else if ( ordinal = = 1 ) {
emitDismissSheetEvent ( ) ;
}
}
public final void onStreamPreviewClicked ( StreamContext streamContext ) {
m . checkNotNullParameter ( streamContext , " streamContext " ) ;
if ( streamContext . getJoinability ( ) = = StreamContext . Joinability . MISSING_PERMISSIONS ) {
2021-08-09 22:50:01 +00:00
emitShowToastEvent ( R . string . channel_locked ) ;
2021-06-27 20:44:35 +00:00
} else {
emitRequestStreamPermissionsEvent ( streamContext . getStream ( ) ) ;
}
}
public final void removeRelationship ( @StringRes int i ) {
ObservableExtensionsKt . appSubscribe$default ( ObservableExtensionsKt . ui$default ( ObservableExtensionsKt . restSubscribeOn$default ( this . restAPI . removeRelationship ( " User Profile " , this . userId ) , false , 1 , null ) , this , null , 2 , null ) , WidgetUserSheetViewModel . class , ( Context ) null , ( Function1 ) null , new WidgetUserSheetViewModel$removeRelationship$2 ( this ) , ( Function0 ) null , ( Function0 ) null , new WidgetUserSheetViewModel$removeRelationship$1 ( this , i ) , 54 , ( Object ) null ) ;
}
2021-07-09 21:07:36 +00:00
public final void saveUserNote ( Context context , String str ) {
m . checkNotNullParameter ( str , " noteText " ) ;
ViewState viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
viewState = null ;
}
ViewState . Loaded loaded = ( ViewState . Loaded ) viewState ;
if ( loaded ! = null ) {
boolean z2 = true ;
if ( ( ! ( loaded . getUserNoteFetchState ( ) instanceof StoreUserNotes . UserNoteState . Empty ) | | ! ( ! m . areEqual ( str , " " ) ) ) & & ( ! ( loaded . getUserNoteFetchState ( ) instanceof StoreUserNotes . UserNoteState . Loaded ) | | ! ( ! m . areEqual ( ( ( StoreUserNotes . UserNoteState . Loaded ) loaded . getUserNoteFetchState ( ) ) . getNote ( ) . getNote ( ) , str ) ) ) ) {
z2 = false ;
}
if ( z2 ) {
this . storeUserNotes . saveNote ( context , this . userId , str ) ;
}
}
}
2021-07-13 20:48:29 +00:00
public final void setOpenPopoutLogged ( boolean z2 ) {
this . openPopoutLogged = z2 ;
}
2021-06-27 20:44:35 +00:00
public final void setUserOutputVolume ( float f ) {
this . storeMediaSettings . setUserOutputVolume ( this . userId , PerceptualVolumeUtils . perceptualToAmplitude$default ( PerceptualVolumeUtils . INSTANCE , f , 0 . 0f , 2 , null ) ) ;
}
public final void setUserSuppressedInChannel ( boolean z2 ) {
Channel channel ;
ViewState viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
viewState = null ;
}
ViewState . Loaded loaded = ( ViewState . Loaded ) viewState ;
if ( loaded ! = null & & ( channel = loaded . getStageViewState ( ) . getChannel ( ) ) ! = null ) {
long id2 = loaded . getUser ( ) . getId ( ) ;
2022-01-11 22:19:46 +00:00
updateViewState ( ViewState . Loaded . copy$default ( loaded , null , false , false , null , null , null , null , null , null , UserProfileStageActionsView . ViewState . m45copyam1GJgw$default ( loaded . getStageViewState ( ) , false , null , null , null , false , false , true , false , 191 , null ) , null , null , null , null , 0 , null , null , null , false , null , false , null , null , null , 16776703 , null ) ) ;
2021-06-27 20:44:35 +00:00
ObservableExtensionsKt . appSubscribe$default ( ObservableExtensionsKt . ui$default ( ObservableExtensionsKt . restSubscribeOn$default ( StageChannelAPI . setUserSuppressedInChannel$default ( StageChannelAPI . INSTANCE , channel , id2 , z2 , 0 , 8 , null ) , false , 1 , null ) , this , null , 2 , null ) , WidgetUserSheetViewModel . class , ( Context ) null , ( Function1 ) null , ( Function1 ) null , ( Function0 ) null , ( Function0 ) null , new WidgetUserSheetViewModel$setUserSuppressedInChannel$1 ( this ) , 62 , ( Object ) null ) ;
}
}
public final void toggleDeafen ( boolean z2 ) {
ViewState viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
viewState = null ;
}
ViewState . Loaded loaded = ( ViewState . Loaded ) viewState ;
if ( loaded ! = null & & loaded . isMe ( ) & & ( ! m . areEqual ( loaded . getVoiceSettingsViewState ( ) . isDeafened ( ) , Boolean . valueOf ( z2 ) ) ) ) {
this . storeMediaSettings . toggleSelfDeafened ( ) ;
}
}
public final void toggleMute ( boolean z2 ) {
ViewState viewState = getViewState ( ) ;
if ( ! ( viewState instanceof ViewState . Loaded ) ) {
viewState = null ;
}
ViewState . Loaded loaded = ( ViewState . Loaded ) viewState ;
if ( loaded ! = null & & loaded . getVoiceSettingsViewState ( ) . isMuted ( ) ! = z2 ) {
if ( loaded . isMe ( ) ) {
StoreMediaSettings . SelfMuteFailure selfMuteFailure = this . storeMediaSettings . toggleSelfMuted ( ) ;
if ( selfMuteFailure ! = null & & selfMuteFailure . ordinal ( ) = = 0 ) {
2021-08-09 22:50:01 +00:00
emitShowToastEvent ( R . string . vad_permission_small ) ;
2021-06-27 20:44:35 +00:00
return ;
}
return ;
}
this . storeMediaSettings . toggleUserMuted ( this . userId ) ;
}
}
}