discord-jadx/app/src/main/java/com/discord/widgets/status/WidgetThreadStatusViewModel...

564 lines
23 KiB
Java
Raw Normal View History

2021-08-03 07:33:18 +00:00
package com.discord.widgets.status;
import android.content.Context;
2022-03-28 08:10:50 +00:00
import b.a.d.d0;
2021-12-17 21:59:34 +00:00
import b.d.b.a.a;
2021-08-03 07:33:18 +00:00
import com.discord.api.channel.Channel;
2021-10-08 22:11:56 +00:00
import com.discord.api.channel.ChannelUtils;
2021-08-03 07:33:18 +00:00
import com.discord.api.thread.ThreadMetadata;
import com.discord.restapi.RestAPIParams;
2022-03-28 08:10:50 +00:00
import com.discord.stores.StoreChannels;
2021-08-03 07:33:18 +00:00
import com.discord.stores.StoreChannelsSelected;
2022-04-01 08:17:34 +00:00
import com.discord.stores.StoreExperiments;
2021-08-03 07:33:18 +00:00
import com.discord.stores.StorePermissions;
import com.discord.stores.StoreStream;
import com.discord.stores.StoreThreadsActiveJoined;
import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.utilities.rx.ObservableExtensionsKt$filterNull$1;
import com.discord.utilities.rx.ObservableExtensionsKt$filterNull$2;
import com.discord.widgets.status.WidgetThreadStatus;
2021-11-02 06:38:17 +00:00
import d0.z.d.m;
import d0.z.d.o;
2021-08-03 07:33:18 +00:00
import java.util.Map;
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: WidgetThreadStatusViewModel.kt */
2022-03-07 09:34:54 +00:00
/* loaded from: classes2.dex */
2022-03-28 08:10:50 +00:00
public final class WidgetThreadStatusViewModel extends d0<ViewState> {
2021-08-03 07:33:18 +00:00
public static final Companion Companion = new Companion(null);
private StoreState currentStoreState;
private final PublishSubject<WidgetThreadStatus.Event> eventSubject;
private final Observable<StoreState> storeStateObservable;
/* compiled from: WidgetThreadStatusViewModel.kt */
/* renamed from: com.discord.widgets.status.WidgetThreadStatusViewModel$1 reason: invalid class name */
2022-03-07 09:34:54 +00:00
/* loaded from: classes2.dex */
2021-08-03 07:33:18 +00:00
public static final class AnonymousClass1 extends o implements Function1<StoreState, Unit> {
2022-03-07 09:34:54 +00:00
public AnonymousClass1() {
2021-08-03 07:33:18 +00:00
super(1);
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(StoreState storeState) {
2022-03-07 09:34:54 +00:00
invoke2(storeState);
2021-08-03 07:33:18 +00:00
return Unit.a;
}
2022-03-07 09:34:54 +00:00
/* renamed from: invoke reason: avoid collision after fix types in other method */
public final void invoke2(StoreState storeState) {
2021-08-03 07:33:18 +00:00
m.checkNotNullParameter(storeState, "storeState");
2022-03-07 09:34:54 +00:00
WidgetThreadStatusViewModel.access$handleStoreState(WidgetThreadStatusViewModel.this, storeState);
2021-08-03 07:33:18 +00:00
}
}
/* compiled from: WidgetThreadStatusViewModel.kt */
2022-03-07 09:34:54 +00:00
/* loaded from: classes2.dex */
2021-08-03 07:33:18 +00:00
public static final class Companion {
private Companion() {
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
2022-04-01 08:17:34 +00:00
private final Observable<StoreState> observeStoreState(StoreThreadsActiveJoined storeThreadsActiveJoined, StoreChannelsSelected storeChannelsSelected, StoreChannels storeChannels, StorePermissions storePermissions, StoreExperiments storeExperiments) {
2022-03-21 18:52:30 +00:00
Observable<R> G = storeChannelsSelected.observeSelectedChannel().y(ObservableExtensionsKt$filterNull$1.INSTANCE).G(ObservableExtensionsKt$filterNull$2.INSTANCE);
m.checkNotNullExpressionValue(G, "filter { it != null }.map { it!! }");
2022-04-01 08:17:34 +00:00
Observable<StoreState> Y = G.Y(new WidgetThreadStatusViewModel$Companion$observeStoreState$1(storeThreadsActiveJoined, storePermissions, storeChannels, storeExperiments));
2021-10-22 06:43:45 +00:00
m.checkNotNullExpressionValue(Y, "storeChannelsSelected.ob…ntilChanged()\n }");
return Y;
2021-08-03 07:33:18 +00:00
}
2022-04-01 08:17:34 +00:00
public static /* synthetic */ Observable observeStoreState$default(Companion companion, StoreThreadsActiveJoined storeThreadsActiveJoined, StoreChannelsSelected storeChannelsSelected, StoreChannels storeChannels, StorePermissions storePermissions, StoreExperiments storeExperiments, int i, Object obj) {
2021-08-03 07:33:18 +00:00
if ((i & 1) != 0) {
storeThreadsActiveJoined = StoreStream.Companion.getThreadsActiveJoined();
}
if ((i & 2) != 0) {
storeChannelsSelected = StoreStream.Companion.getChannelsSelected();
}
if ((i & 4) != 0) {
2022-03-28 08:10:50 +00:00
storeChannels = StoreStream.Companion.getChannels();
}
if ((i & 8) != 0) {
2021-08-03 07:33:18 +00:00
storePermissions = StoreStream.Companion.getPermissions();
}
2022-04-01 08:17:34 +00:00
if ((i & 16) != 0) {
storeExperiments = StoreStream.Companion.getExperiments();
}
return companion.observeStoreState(storeThreadsActiveJoined, storeChannelsSelected, storeChannels, storePermissions, storeExperiments);
2021-08-03 07:33:18 +00:00
}
}
/* compiled from: WidgetThreadStatusViewModel.kt */
2022-03-07 09:34:54 +00:00
/* loaded from: classes2.dex */
2021-08-03 07:33:18 +00:00
public static abstract class Status {
/* compiled from: WidgetThreadStatusViewModel.kt */
2022-03-07 09:34:54 +00:00
/* loaded from: classes2.dex */
2021-08-03 07:33:18 +00:00
public static final class Archived extends Status {
private final boolean canArchive;
private final boolean isLocked;
public Archived(boolean z2, boolean z3) {
super(null);
this.isLocked = z2;
this.canArchive = z3;
}
public static /* synthetic */ Archived copy$default(Archived archived, boolean z2, boolean z3, int i, Object obj) {
if ((i & 1) != 0) {
z2 = archived.isLocked;
}
if ((i & 2) != 0) {
z3 = archived.canArchive;
}
return archived.copy(z2, z3);
}
public final boolean component1() {
return this.isLocked;
}
public final boolean component2() {
return this.canArchive;
}
public final Archived copy(boolean z2, boolean z3) {
return new Archived(z2, z3);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Archived)) {
return false;
}
Archived archived = (Archived) obj;
return this.isLocked == archived.isLocked && this.canArchive == archived.canArchive;
}
public final boolean getCanArchive() {
return this.canArchive;
}
public int hashCode() {
boolean z2 = this.isLocked;
int i = 1;
if (z2) {
z2 = true;
}
int i2 = z2 ? 1 : 0;
int i3 = z2 ? 1 : 0;
int i4 = z2 ? 1 : 0;
int i5 = i2 * 31;
boolean z3 = this.canArchive;
if (!z3) {
i = z3 ? 1 : 0;
}
return i5 + i;
}
public final boolean isLocked() {
return this.isLocked;
}
public String toString() {
2022-03-21 18:52:30 +00:00
StringBuilder R = a.R("Archived(isLocked=");
R.append(this.isLocked);
R.append(", canArchive=");
return a.M(R, this.canArchive, ")");
2021-08-03 07:33:18 +00:00
}
}
/* compiled from: WidgetThreadStatusViewModel.kt */
2022-03-07 09:34:54 +00:00
/* loaded from: classes2.dex */
2021-08-03 07:33:18 +00:00
public static final class Hide extends Status {
public static final Hide INSTANCE = new Hide();
private Hide() {
super(null);
}
}
/* compiled from: WidgetThreadStatusViewModel.kt */
2022-03-07 09:34:54 +00:00
/* loaded from: classes2.dex */
2021-08-03 07:33:18 +00:00
public static final class Unjoined extends Status {
public static final Unjoined INSTANCE = new Unjoined();
private Unjoined() {
super(null);
}
}
private Status() {
}
public /* synthetic */ Status(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
/* compiled from: WidgetThreadStatusViewModel.kt */
2022-03-07 09:34:54 +00:00
/* loaded from: classes2.dex */
2021-08-03 07:33:18 +00:00
public static final class StoreState {
private final Map<Long, Map<Long, StoreThreadsActiveJoined.ActiveJoinedThread>> activeJoinedThreads;
2022-04-01 08:17:34 +00:00
private final boolean canAccessRedesignedForumChannels;
2021-08-03 07:33:18 +00:00
private final boolean canArchive;
private final boolean isModerator;
2022-03-28 08:10:50 +00:00
private final Channel parentChannel;
2021-08-03 07:33:18 +00:00
private final Channel selectedChannel;
/* JADX WARN: Multi-variable type inference failed */
2022-04-01 08:17:34 +00:00
public StoreState(Map<Long, ? extends Map<Long, StoreThreadsActiveJoined.ActiveJoinedThread>> map, Channel channel, Channel channel2, boolean z2, boolean z3, boolean z4) {
2021-08-03 07:33:18 +00:00
m.checkNotNullParameter(map, "activeJoinedThreads");
this.activeJoinedThreads = map;
this.selectedChannel = channel;
2022-03-28 08:10:50 +00:00
this.parentChannel = channel2;
2021-08-03 07:33:18 +00:00
this.canArchive = z2;
this.isModerator = z3;
2022-04-01 08:17:34 +00:00
this.canAccessRedesignedForumChannels = z4;
2021-08-03 07:33:18 +00:00
}
/* JADX WARN: Multi-variable type inference failed */
2022-04-01 08:17:34 +00:00
public static /* synthetic */ StoreState copy$default(StoreState storeState, Map map, Channel channel, Channel channel2, boolean z2, boolean z3, boolean z4, int i, Object obj) {
2021-08-03 07:33:18 +00:00
if ((i & 1) != 0) {
map = storeState.activeJoinedThreads;
}
if ((i & 2) != 0) {
channel = storeState.selectedChannel;
}
if ((i & 4) != 0) {
2022-03-28 08:10:50 +00:00
channel2 = storeState.parentChannel;
2021-08-03 07:33:18 +00:00
}
if ((i & 8) != 0) {
2022-03-28 08:10:50 +00:00
z2 = storeState.canArchive;
}
if ((i & 16) != 0) {
2021-08-03 07:33:18 +00:00
z3 = storeState.isModerator;
}
2022-04-01 08:17:34 +00:00
if ((i & 32) != 0) {
z4 = storeState.canAccessRedesignedForumChannels;
}
return storeState.copy(map, channel, channel2, z2, z3, z4);
2021-08-03 07:33:18 +00:00
}
public final Map<Long, Map<Long, StoreThreadsActiveJoined.ActiveJoinedThread>> component1() {
return this.activeJoinedThreads;
}
public final Channel component2() {
return this.selectedChannel;
}
2022-03-28 08:10:50 +00:00
public final Channel component3() {
return this.parentChannel;
2021-08-03 07:33:18 +00:00
}
public final boolean component4() {
2022-03-28 08:10:50 +00:00
return this.canArchive;
}
public final boolean component5() {
2021-08-03 07:33:18 +00:00
return this.isModerator;
}
2022-04-01 08:17:34 +00:00
public final boolean component6() {
return this.canAccessRedesignedForumChannels;
}
public final StoreState copy(Map<Long, ? extends Map<Long, StoreThreadsActiveJoined.ActiveJoinedThread>> map, Channel channel, Channel channel2, boolean z2, boolean z3, boolean z4) {
2021-08-03 07:33:18 +00:00
m.checkNotNullParameter(map, "activeJoinedThreads");
2022-04-01 08:17:34 +00:00
return new StoreState(map, channel, channel2, z2, z3, z4);
2021-08-03 07:33:18 +00:00
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof StoreState)) {
return false;
}
StoreState storeState = (StoreState) obj;
2022-04-01 08:17:34 +00:00
return m.areEqual(this.activeJoinedThreads, storeState.activeJoinedThreads) && m.areEqual(this.selectedChannel, storeState.selectedChannel) && m.areEqual(this.parentChannel, storeState.parentChannel) && this.canArchive == storeState.canArchive && this.isModerator == storeState.isModerator && this.canAccessRedesignedForumChannels == storeState.canAccessRedesignedForumChannels;
2021-08-03 07:33:18 +00:00
}
public final Map<Long, Map<Long, StoreThreadsActiveJoined.ActiveJoinedThread>> getActiveJoinedThreads() {
return this.activeJoinedThreads;
}
2022-04-01 08:17:34 +00:00
public final boolean getCanAccessRedesignedForumChannels() {
return this.canAccessRedesignedForumChannels;
}
2021-08-03 07:33:18 +00:00
public final boolean getCanArchive() {
return this.canArchive;
}
2022-03-28 08:10:50 +00:00
public final Channel getParentChannel() {
return this.parentChannel;
}
2021-08-03 07:33:18 +00:00
public final Channel getSelectedChannel() {
return this.selectedChannel;
}
public int hashCode() {
Map<Long, Map<Long, StoreThreadsActiveJoined.ActiveJoinedThread>> map = this.activeJoinedThreads;
int i = 0;
int hashCode = (map != null ? map.hashCode() : 0) * 31;
Channel channel = this.selectedChannel;
2022-03-28 08:10:50 +00:00
int hashCode2 = (hashCode + (channel != null ? channel.hashCode() : 0)) * 31;
Channel channel2 = this.parentChannel;
if (channel2 != null) {
i = channel2.hashCode();
2021-08-03 07:33:18 +00:00
}
2022-03-28 08:10:50 +00:00
int i2 = (hashCode2 + i) * 31;
2021-08-03 07:33:18 +00:00
boolean z2 = this.canArchive;
int i3 = 1;
if (z2) {
z2 = true;
}
int i4 = z2 ? 1 : 0;
int i5 = z2 ? 1 : 0;
int i6 = z2 ? 1 : 0;
int i7 = (i2 + i4) * 31;
boolean z3 = this.isModerator;
2022-04-01 08:17:34 +00:00
if (z3) {
z3 = true;
}
int i8 = z3 ? 1 : 0;
int i9 = z3 ? 1 : 0;
int i10 = z3 ? 1 : 0;
int i11 = (i7 + i8) * 31;
boolean z4 = this.canAccessRedesignedForumChannels;
if (!z4) {
i3 = z4 ? 1 : 0;
2021-08-03 07:33:18 +00:00
}
2022-04-01 08:17:34 +00:00
return i11 + i3;
2021-08-03 07:33:18 +00:00
}
public final boolean isModerator() {
return this.isModerator;
}
public String toString() {
2022-03-21 18:52:30 +00:00
StringBuilder R = a.R("StoreState(activeJoinedThreads=");
R.append(this.activeJoinedThreads);
R.append(", selectedChannel=");
R.append(this.selectedChannel);
2022-03-28 08:10:50 +00:00
R.append(", parentChannel=");
R.append(this.parentChannel);
2022-03-21 18:52:30 +00:00
R.append(", canArchive=");
R.append(this.canArchive);
R.append(", isModerator=");
2022-04-01 08:17:34 +00:00
R.append(this.isModerator);
R.append(", canAccessRedesignedForumChannels=");
return a.M(R, this.canAccessRedesignedForumChannels, ")");
2021-08-03 07:33:18 +00:00
}
}
/* compiled from: WidgetThreadStatusViewModel.kt */
2022-03-07 09:34:54 +00:00
/* loaded from: classes2.dex */
2021-08-03 07:33:18 +00:00
public static final class ViewState {
private final boolean isLoading;
private final Status threadStatus;
public ViewState(Status status, boolean z2) {
m.checkNotNullParameter(status, "threadStatus");
this.threadStatus = status;
this.isLoading = z2;
}
public /* synthetic */ ViewState(Status status, boolean z2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(status, (i & 2) != 0 ? false : z2);
}
public static /* synthetic */ ViewState copy$default(ViewState viewState, Status status, boolean z2, int i, Object obj) {
if ((i & 1) != 0) {
status = viewState.threadStatus;
}
if ((i & 2) != 0) {
z2 = viewState.isLoading;
}
return viewState.copy(status, z2);
}
public final Status component1() {
return this.threadStatus;
}
public final boolean component2() {
return this.isLoading;
}
public final ViewState copy(Status status, boolean z2) {
m.checkNotNullParameter(status, "threadStatus");
return new ViewState(status, z2);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof ViewState)) {
return false;
}
ViewState viewState = (ViewState) obj;
return m.areEqual(this.threadStatus, viewState.threadStatus) && this.isLoading == viewState.isLoading;
}
public final Status getThreadStatus() {
return this.threadStatus;
}
public int hashCode() {
Status status = this.threadStatus;
int hashCode = (status != null ? status.hashCode() : 0) * 31;
boolean z2 = this.isLoading;
if (z2) {
z2 = true;
}
int i = z2 ? 1 : 0;
int i2 = z2 ? 1 : 0;
int i3 = z2 ? 1 : 0;
return hashCode + i;
}
public final boolean isLoading() {
return this.isLoading;
}
public String toString() {
2022-03-21 18:52:30 +00:00
StringBuilder R = a.R("ViewState(threadStatus=");
R.append(this.threadStatus);
R.append(", isLoading=");
return a.M(R, this.isLoading, ")");
2021-08-03 07:33:18 +00:00
}
}
public WidgetThreadStatusViewModel() {
2021-08-28 06:29:07 +00:00
this(null, 1, null);
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
2021-08-28 06:29:07 +00:00
public WidgetThreadStatusViewModel(Observable<StoreState> observable) {
2021-08-03 07:33:18 +00:00
super(null, 1, null);
m.checkNotNullParameter(observable, "storeStateObservable");
this.storeStateObservable = observable;
2021-10-22 06:43:45 +00:00
this.eventSubject = PublishSubject.k0();
2022-03-07 09:34:54 +00:00
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(observable, this, null, 2, null), WidgetThreadStatusViewModel.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass1(), 62, (Object) null);
2021-08-03 07:33:18 +00:00
}
2021-08-28 06:29:07 +00:00
public /* synthetic */ WidgetThreadStatusViewModel(Observable observable, int i, DefaultConstructorMarker defaultConstructorMarker) {
2022-04-01 08:17:34 +00:00
this((i & 1) != 0 ? Companion.observeStoreState$default(Companion, null, null, null, null, null, 31, null) : observable);
2021-08-03 07:33:18 +00:00
}
public static final /* synthetic */ void access$emitError(WidgetThreadStatusViewModel widgetThreadStatusViewModel, int i) {
widgetThreadStatusViewModel.emitError(i);
}
public static final /* synthetic */ void access$handleStoreState(WidgetThreadStatusViewModel widgetThreadStatusViewModel, StoreState storeState) {
widgetThreadStatusViewModel.handleStoreState(storeState);
}
public static final /* synthetic */ void access$updateViewLoading(WidgetThreadStatusViewModel widgetThreadStatusViewModel, boolean z2) {
widgetThreadStatusViewModel.updateViewLoading(z2);
}
private final void emitError(int i) {
PublishSubject<WidgetThreadStatus.Event> publishSubject = this.eventSubject;
2021-12-02 18:53:44 +00:00
publishSubject.k.onNext(new WidgetThreadStatus.Event.Error(i));
2021-08-03 07:33:18 +00:00
}
private final void handleStoreState(StoreState storeState) {
Status status;
this.currentStoreState = storeState;
Channel selectedChannel = storeState.getSelectedChannel();
2022-03-28 08:10:50 +00:00
Channel parentChannel = storeState.getParentChannel();
2021-08-03 07:33:18 +00:00
Map<Long, Map<Long, StoreThreadsActiveJoined.ActiveJoinedThread>> activeJoinedThreads = storeState.getActiveJoinedThreads();
Channel selectedChannel2 = storeState.getSelectedChannel();
StoreThreadsActiveJoined.ActiveJoinedThread activeJoinedThread = null;
2022-03-28 08:10:50 +00:00
Map<Long, StoreThreadsActiveJoined.ActiveJoinedThread> map = activeJoinedThreads.get(selectedChannel2 != null ? Long.valueOf(selectedChannel2.u()) : null);
2021-08-03 07:33:18 +00:00
if (map != null) {
Channel selectedChannel3 = storeState.getSelectedChannel();
if (selectedChannel3 != null) {
2022-03-28 08:10:50 +00:00
activeJoinedThread = Long.valueOf(selectedChannel3.k());
2021-08-03 07:33:18 +00:00
}
activeJoinedThread = map.get(activeJoinedThread);
}
boolean z2 = false;
boolean z3 = activeJoinedThread != null;
2022-03-28 08:10:50 +00:00
if (selectedChannel == null || !ChannelUtils.F(selectedChannel)) {
2021-08-03 07:33:18 +00:00
status = Status.Hide.INSTANCE;
2022-04-01 08:17:34 +00:00
} else if (parentChannel == null || !ChannelUtils.q(parentChannel) || !storeState.getCanAccessRedesignedForumChannels()) {
2022-03-28 08:10:50 +00:00
ThreadMetadata B = selectedChannel.B();
if (B == null || !B.b()) {
2021-08-28 06:29:07 +00:00
status = z3 ? Status.Hide.INSTANCE : Status.Unjoined.INSTANCE;
2021-08-03 07:33:18 +00:00
} else {
2022-03-28 08:10:50 +00:00
ThreadMetadata B2 = selectedChannel.B();
if (B2 != null && B2.d()) {
2021-08-03 07:33:18 +00:00
z2 = true;
}
status = new Status.Archived(z2, storeState.getCanArchive());
}
2022-03-28 08:10:50 +00:00
} else {
status = Status.Hide.INSTANCE;
2021-08-03 07:33:18 +00:00
}
updateViewWithStatus(status);
}
private final void updateViewLoading(boolean z2) {
ViewState viewState = getViewState();
if (viewState != null) {
updateViewState(ViewState.copy$default(viewState, null, z2, 1, null));
}
}
private final void updateViewWithStatus(Status status) {
updateViewState(new ViewState(status, false, 2, null));
}
public final Observable<StoreState> getStoreStateObservable() {
return this.storeStateObservable;
}
public final Observable<WidgetThreadStatus.Event> observeEvents() {
PublishSubject<WidgetThreadStatus.Event> publishSubject = this.eventSubject;
m.checkNotNullExpressionValue(publishSubject, "eventSubject");
return publishSubject;
}
public final void onJoinTapped() {
StoreState storeState = this.currentStoreState;
if (storeState != null) {
if (storeState.getSelectedChannel() != null) {
2022-03-28 08:10:50 +00:00
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().joinThread(storeState.getSelectedChannel().k(), "Banner", new RestAPIParams.EmptyBody()), false, 1, null), this, null, 2, null), WidgetThreadStatusViewModel.class, (Context) null, (Function1) null, new WidgetThreadStatusViewModel$onJoinTapped$$inlined$let$lambda$1(this), (Function0) null, new WidgetThreadStatusViewModel$onJoinTapped$$inlined$let$lambda$2(this), WidgetThreadStatusViewModel$onJoinTapped$1$2.INSTANCE, 22, (Object) null);
2021-08-03 07:33:18 +00:00
} else {
return;
}
}
updateViewLoading(true);
}
public final void onUnarchiveTapped() {
StoreState storeState = this.currentStoreState;
if (storeState != null) {
if (storeState.getSelectedChannel() != null) {
RestAPI api = RestAPI.Companion.getApi();
2022-03-28 08:10:50 +00:00
long k = storeState.getSelectedChannel().k();
2021-08-03 07:33:18 +00:00
Boolean bool = Boolean.FALSE;
2022-03-28 08:10:50 +00:00
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(api.editThread(k, new RestAPIParams.ThreadSettings(bool, storeState.isModerator() ? bool : null, null, 4, null)), false, 1, null), this, null, 2, null), WidgetThreadStatusViewModel.class, (Context) null, (Function1) null, new WidgetThreadStatusViewModel$onUnarchiveTapped$$inlined$let$lambda$1(this), (Function0) null, new WidgetThreadStatusViewModel$onUnarchiveTapped$$inlined$let$lambda$2(this), WidgetThreadStatusViewModel$onUnarchiveTapped$1$2.INSTANCE, 22, (Object) null);
2021-08-03 07:33:18 +00:00
} else {
return;
}
}
updateViewLoading(true);
}
}