discord-jadx/app/src/main/java/com/discord/widgets/chat/input/ChatInputViewModel$observeC...

31 lines
2.0 KiB
Java

package com.discord.widgets.chat.input;
import com.discord.models.member.GuildMember;
import com.discord.widgets.chat.input.ChatInputViewModel;
import rx.functions.Func2;
/* compiled from: ChatInputViewModel.kt */
public final class ChatInputViewModel$observeChatInputViewState$2<T1, T2, R> implements Func2<Long, ChatInputViewModel.ViewState, ChatInputViewModel.ViewState> {
public final /* synthetic */ ChatInputViewModel this$0;
public ChatInputViewModel$observeChatInputViewState$2(ChatInputViewModel chatInputViewModel) {
this.this$0 = chatInputViewModel;
}
public final ChatInputViewModel.ViewState call(Long l, ChatInputViewModel.ViewState viewState) {
ChatInputViewModel.ViewState.Loaded loaded = (ChatInputViewModel.ViewState.Loaded) (!(viewState instanceof ChatInputViewModel.ViewState.Loaded) ? null : viewState);
if (loaded == null) {
return viewState;
}
if (ChatInputViewModel.access$getUseTimeoutUpdateInterval$p(this.this$0)) {
long access$calculateTimeoutLeftMs = ChatInputViewModel.access$calculateTimeoutLeftMs(this.this$0, loaded.getMeGuildMember());
GuildMember meGuildMember = loaded.getMeGuildMember();
ChatInputViewModel.ViewState.Loaded copy$default = ChatInputViewModel.ViewState.Loaded.copy$default(loaded, null, 0, null, null, null, false, null, false, false, false, 0, false, null, false, false, false, false, false, false, meGuildMember != null && meGuildMember.isCommunicationDisabled(), access$calculateTimeoutLeftMs, null, false, null, null, false, 65535999, null);
if (loaded.getMeGuildMember() != null && loaded.isCommunicationDisabled() && !copy$default.isCommunicationDisabled()) {
ChatInputViewModel.access$getStoreGuilds$p(this.this$0).handleGuildMemberCommunicationEnabled(loaded.getMeGuildMember().getGuildId(), loaded.getMeGuildMember().getUserId());
}
loaded = copy$default;
}
return loaded != null ? loaded : viewState;
}
}