94.1 - Alpha (94201)

This commit is contained in:
Juby210 2021-09-22 08:37:51 +02:00
parent 00df26390d
commit c899db8087
107 changed files with 7613 additions and 7165 deletions

View file

@ -10,8 +10,8 @@ android {
applicationId 'com.discord' applicationId 'com.discord'
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 29 targetSdkVersion 29
versionCode 94200 versionCode 94201
versionName "94.0 - Alpha" versionName "94.1 - Alpha"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="94200" android:versionName="94.0 - Alpha" android:installLocation="auto" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.discord" platformBuildVersionCode="30" platformBuildVersionName="11"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="94201" android:versionName="94.1 - Alpha" android:installLocation="auto" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.discord" platformBuildVersionCode="30" platformBuildVersionName="11">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/> <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/> <uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/> <uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>

View file

@ -46,9 +46,8 @@ public final /* synthetic */ class a extends k implements Function1<Stats, Unit>
Transport transport = stats2.getTransport(); Transport transport = stats2.getTransport();
eVar.g(null, Integer.valueOf((transport == null || (receiverReports = transport.getReceiverReports()) == null) ? 0 : receiverReports.length), currentTimeMillis); eVar.g(null, Integer.valueOf((transport == null || (receiverReports = transport.getReceiverReports()) == null) ? 0 : receiverReports.length), currentTimeMillis);
if (!eVar.k.a() && (outboundRtpVideo = stats2.getOutboundRtpVideo()) != null) { if (!eVar.k.a() && (outboundRtpVideo = stats2.getOutboundRtpVideo()) != null) {
eVar.a(eVar.l, new e.h((long) outboundRtpVideo.getResolution().getHeight(), currentTimeMillis, new e.a(outboundRtpVideo.getFramesEncoded(), outboundRtpVideo.getFramesSent(), outboundRtpVideo.getPacketsSent(), (long) outboundRtpVideo.getPacketsLost(), 0, outboundRtpVideo.getBytesSent(), outboundRtpVideo.getNackCount(), outboundRtpVideo.getPliCount(), outboundRtpVideo.getQpSum()))); eVar.a(eVar.l, new e.g((long) outboundRtpVideo.getResolution().getHeight(), currentTimeMillis, new e.a(outboundRtpVideo.getFramesEncoded(), outboundRtpVideo.getFramesSent(), outboundRtpVideo.getPacketsSent(), (long) outboundRtpVideo.getPacketsLost(), 0, outboundRtpVideo.getBytesSent(), outboundRtpVideo.getNackCount(), outboundRtpVideo.getPliCount(), outboundRtpVideo.getQpSum())));
if (eVar.l.d == null && outboundRtpVideo.getFramesEncoded() > 0) { if (eVar.l.d == null && outboundRtpVideo.getFramesEncoded() > 0) {
eVar.e.notifyAsync(g.i);
eVar.l.d = Long.valueOf(currentTimeMillis - eVar.g); eVar.l.d = Long.valueOf(currentTimeMillis - eVar.g);
Logger.i$default(eVar.p, "VideoQuality: outboundStats.timeToFirstFrame: " + eVar.l.d, null, 2, null); Logger.i$default(eVar.p, "VideoQuality: outboundStats.timeToFirstFrame: " + eVar.l.d, null, 2, null);
} }
@ -76,7 +75,6 @@ public final /* synthetic */ class a extends k implements Function1<Stats, Unit>
} }
Long l = eVar.n.get(Long.valueOf(value.getSsrc())); Long l = eVar.n.get(Long.valueOf(value.getSsrc()));
if (l != null) { if (l != null) {
eVar.e.notifyAsync(new h(value));
eVar3.d = Long.valueOf(currentTimeMillis - l.longValue()); eVar3.d = Long.valueOf(currentTimeMillis - l.longValue());
Logger.i$default(eVar.p, "VideoQuality: inbound.timeToFirstFrame: " + eVar3.d + " (userId: " + j + ", ssrc: " + value.getSsrc() + ')', null, 2, null); Logger.i$default(eVar.p, "VideoQuality: inbound.timeToFirstFrame: " + eVar3.d + " (userId: " + j + ", ssrc: " + value.getSsrc() + ')', null, 2, null);
} else { } else {

View file

@ -33,14 +33,14 @@ public final class e {
/* renamed from: c reason: collision with root package name */ /* renamed from: c reason: collision with root package name */
public static final List<Integer> f230c = n.listOf((Object[]) new Integer[]{720, 480, 360}); public static final List<Integer> f230c = n.listOf((Object[]) new Integer[]{720, 480, 360});
public static final b d = new b(null); public static final b d = new b(null);
public final ListenerCollectionSubject<f> e; public final ListenerCollectionSubject<?> e;
public final ListenerCollection<f> f; public final ListenerCollection<?> f;
public final long g; public final long g;
public Long h; public Long h;
public final d i; public final d i;
public final d j; public final d j;
public final d k; public final d k;
public final g l = new g(); public final f l = new f();
public final Map<String, C0043e> m = new LinkedHashMap(); public final Map<String, C0043e> m = new LinkedHashMap();
public final Map<Long, Long> n = new LinkedHashMap(); public final Map<Long, Long> n = new LinkedHashMap();
public final DeviceResourceUsageMonitor o; public final DeviceResourceUsageMonitor o;
@ -140,7 +140,7 @@ public final class e {
} }
/* compiled from: VideoQuality.kt */ /* compiled from: VideoQuality.kt */
public static abstract class c implements f { public static abstract class c {
} }
/* compiled from: VideoQuality.kt */ /* compiled from: VideoQuality.kt */
@ -183,7 +183,7 @@ public final class e {
/* compiled from: VideoQuality.kt */ /* compiled from: VideoQuality.kt */
/* renamed from: c.a.q.o0.e$e reason: collision with other inner class name */ /* renamed from: c.a.q.o0.e$e reason: collision with other inner class name */
public static class C0043e { public static class C0043e {
public List<h> a = new ArrayList(); public List<g> a = new ArrayList();
public final Histogram b = new Histogram(5, 0, 2, null); public final Histogram b = new Histogram(5, 0, 2, null);
/* renamed from: c reason: collision with root package name */ /* renamed from: c reason: collision with root package name */
@ -210,14 +210,7 @@ public final class e {
} }
/* compiled from: VideoQuality.kt */ /* compiled from: VideoQuality.kt */
public interface f { public static final class f extends C0043e {
void onFirstFrameReceived(long j);
void onFirstFrameSent();
}
/* compiled from: VideoQuality.kt */
public static final class g extends C0043e {
public int k = 2500000; public int k = 2500000;
public int l = 30; public int l = 30;
public long m; public long m;
@ -226,18 +219,18 @@ public final class e {
} }
/* compiled from: VideoQuality.kt */ /* compiled from: VideoQuality.kt */
public static final class h { public static final class g {
public final long a; public final long a;
public final long b; public final long b;
/* renamed from: c reason: collision with root package name */ /* renamed from: c reason: collision with root package name */
public final a f233c; public final a f233c;
public h() { public g() {
this(0, 0, new a(0, 0, 0, 0, 0, 0, 0, 0, 0, FrameMetricsAggregator.EVERY_DURATION)); this(0, 0, new a(0, 0, 0, 0, 0, 0, 0, 0, 0, FrameMetricsAggregator.EVERY_DURATION));
} }
public h(long j, long j2, a aVar) { public g(long j, long j2, a aVar) {
m.checkNotNullParameter(aVar, "aggregatedProperties"); m.checkNotNullParameter(aVar, "aggregatedProperties");
this.a = j; this.a = j;
this.b = j2; this.b = j2;
@ -248,11 +241,11 @@ public final class e {
if (this == obj) { if (this == obj) {
return true; return true;
} }
if (!(obj instanceof h)) { if (!(obj instanceof g)) {
return false; return false;
} }
h hVar = (h) obj; g gVar = (g) obj;
return this.a == hVar.a && this.b == hVar.b && m.areEqual(this.f233c, hVar.f233c); return this.a == gVar.a && this.b == gVar.b && m.areEqual(this.f233c, gVar.f233c);
} }
public int hashCode() { public int hashCode() {
@ -274,11 +267,11 @@ public final class e {
} }
/* compiled from: VideoQuality.kt */ /* compiled from: VideoQuality.kt */
public static final class i extends o implements Function1<DeviceResourceUsageMonitor.ResourceUsage, Unit> { public static final class h extends o implements Function1<DeviceResourceUsageMonitor.ResourceUsage, Unit> {
public final /* synthetic */ e this$0; public final /* synthetic */ e this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public i(e eVar) { public h(e eVar) {
super(1); super(1);
this.this$0 = eVar; this.this$0 = eVar;
} }
@ -309,7 +302,7 @@ public final class e {
m.checkNotNullParameter(clock, "clock"); m.checkNotNullParameter(clock, "clock");
this.p = logger; this.p = logger;
this.q = clock; this.q = clock;
ListenerCollectionSubject<f> listenerCollectionSubject = new ListenerCollectionSubject<>(); ListenerCollectionSubject<?> listenerCollectionSubject = new ListenerCollectionSubject<>();
this.e = listenerCollectionSubject; this.e = listenerCollectionSubject;
this.f = listenerCollectionSubject; this.f = listenerCollectionSubject;
long currentTimeMillis = clock.currentTimeMillis(); long currentTimeMillis = clock.currentTimeMillis();
@ -317,23 +310,23 @@ public final class e {
this.i = new d(false, currentTimeMillis); this.i = new d(false, currentTimeMillis);
this.j = new d(false, currentTimeMillis); this.j = new d(false, currentTimeMillis);
this.k = new d(false, currentTimeMillis); this.k = new d(false, currentTimeMillis);
DeviceResourceUsageMonitor deviceResourceUsageMonitor = new DeviceResourceUsageMonitor(new TimeSpan(1, TimeUnit.SECONDS), clock, new i(this)); DeviceResourceUsageMonitor deviceResourceUsageMonitor = new DeviceResourceUsageMonitor(new TimeSpan(1, TimeUnit.SECONDS), clock, new h(this));
this.o = deviceResourceUsageMonitor; this.o = deviceResourceUsageMonitor;
deviceResourceUsageMonitor.start(); deviceResourceUsageMonitor.start();
} }
public final void a(C0043e eVar, h hVar) { public final void a(C0043e eVar, g gVar) {
eVar.a.add(hVar); eVar.a.add(gVar);
if (eVar.a.size() >= 2) { if (eVar.a.size() >= 2) {
List<h> list = eVar.a; List<g> list = eVar.a;
h hVar2 = list.get(list.size() - 1); g gVar2 = list.get(list.size() - 1);
List<h> list2 = eVar.a; List<g> list2 = eVar.a;
h hVar3 = list2.get(list2.size() - 2); g gVar3 = list2.get(list2.size() - 2);
f fVar = f.i; f fVar = f.i;
eVar.f = (hVar2.b - hVar3.b) + eVar.f; eVar.f = (gVar2.b - gVar3.b) + eVar.f;
a aVar = eVar.e; a aVar = eVar.e;
a aVar2 = hVar2.f233c; a aVar2 = gVar2.f233c;
a aVar3 = hVar3.f233c; a aVar3 = gVar3.f233c;
aVar.a = fVar.a(aVar2.a, aVar3.a) + aVar.a; aVar.a = fVar.a(aVar2.a, aVar3.a) + aVar.a;
aVar.b = fVar.a(aVar2.b, aVar3.b) + aVar.b; aVar.b = fVar.a(aVar2.b, aVar3.b) + aVar.b;
aVar.f231c = fVar.a(aVar2.f231c, aVar3.f231c) + aVar.f231c; aVar.f231c = fVar.a(aVar2.f231c, aVar3.f231c) + aVar.f231c;
@ -343,20 +336,20 @@ public final class e {
aVar.g = fVar.a(aVar2.g, aVar3.g) + aVar.g; aVar.g = fVar.a(aVar2.g, aVar3.g) + aVar.g;
aVar.h = fVar.a(aVar2.h, aVar3.h) + aVar.h; aVar.h = fVar.a(aVar2.h, aVar3.h) + aVar.h;
aVar.i = fVar.a(aVar2.i, aVar3.i) + aVar.i; aVar.i = fVar.a(aVar2.i, aVar3.i) + aVar.i;
a aVar4 = hVar2.f233c; a aVar4 = gVar2.f233c;
long j = aVar4.f; long j = aVar4.f;
long j2 = aVar4.a; long j2 = aVar4.a;
long j3 = hVar2.b; long j3 = gVar2.b;
long j4 = hVar2.a; long j4 = gVar2.a;
float f2 = ((float) (j3 - hVar3.b)) / 1000.0f; float f2 = ((float) (j3 - gVar3.b)) / 1000.0f;
eVar.i = (((float) j4) * f2) + eVar.i; eVar.i = (((float) j4) * f2) + eVar.i;
if (eVar.a.size() >= 6) { if (eVar.a.size() >= 6) {
List<h> list3 = eVar.a; List<g> list3 = eVar.a;
h hVar4 = list3.get(list3.size() - 3); g gVar4 = list3.get(list3.size() - 3);
a aVar5 = hVar4.f233c; a aVar5 = gVar4.f233c;
long j5 = aVar5.f; long j5 = aVar5.f;
long j6 = aVar5.a; long j6 = aVar5.a;
long j7 = hVar4.b; long j7 = gVar4.b;
Iterator<T> it = f230c.iterator(); Iterator<T> it = f230c.iterator();
while (true) { while (true) {
float f3 = 0.0f; float f3 = 0.0f;
@ -402,28 +395,28 @@ public final class e {
} }
} }
public final void b(int i2) { public final void b(int i) {
if (this.l.a.size() >= 2) { if (this.l.a.size() >= 2) {
List<h> list = this.l.a; List<g> list = this.l.a;
long j = list.get(list.size() - 1).b; long j = list.get(list.size() - 1).b;
List<h> list2 = this.l.a; List<g> list2 = this.l.a;
float f2 = ((float) (j - list2.get(list2.size() - 2).b)) / 1000.0f; float f2 = ((float) (j - list2.get(list2.size() - 2).b)) / 1000.0f;
g gVar = this.l; f fVar = this.l;
long j2 = gVar.m; long j2 = fVar.m;
Float valueOf = Float.valueOf(((float) gVar.l) * f2); Float valueOf = Float.valueOf(((float) fVar.l) * f2);
long j3 = 0; long j3 = 0;
gVar.m = j2 + (valueOf != null ? d0.a0.a.roundToLong(valueOf.floatValue()) : 0); fVar.m = j2 + (valueOf != null ? d0.a0.a.roundToLong(valueOf.floatValue()) : 0);
g gVar2 = this.l; f fVar2 = this.l;
long j4 = gVar2.n; long j4 = fVar2.n;
Float valueOf2 = Float.valueOf((((float) i2) / 8.0f) * f2); Float valueOf2 = Float.valueOf((((float) i) / 8.0f) * f2);
gVar2.n = j4 + (valueOf2 != null ? d0.a0.a.roundToLong(valueOf2.floatValue()) : 0); fVar2.n = j4 + (valueOf2 != null ? d0.a0.a.roundToLong(valueOf2.floatValue()) : 0);
g gVar3 = this.l; f fVar3 = this.l;
long j5 = gVar3.o; long j5 = fVar3.o;
Float valueOf3 = Float.valueOf((((float) gVar3.k) / 8.0f) * f2); Float valueOf3 = Float.valueOf((((float) fVar3.k) / 8.0f) * f2);
if (valueOf3 != null) { if (valueOf3 != null) {
j3 = d0.a0.a.roundToLong(valueOf3.floatValue()); j3 = d0.a0.a.roundToLong(valueOf3.floatValue());
} }
gVar3.o = j5 + j3; fVar3.o = j5 + j3;
} }
} }
@ -437,16 +430,16 @@ public final class e {
@AnyThread @AnyThread
public final synchronized Map<String, Object> d() { public final synchronized Map<String, Object> d() {
g gVar; f fVar;
float f2; float f2;
int i2; int i;
Float valueOf; Float valueOf;
Float valueOf2; Float valueOf2;
Float valueOf3; Float valueOf3;
gVar = this.l; fVar = this.l;
f2 = ((float) gVar.f) / 1000.0f; f2 = ((float) fVar.f) / 1000.0f;
i2 = (f2 > ((float) 0) ? 1 : (f2 == ((float) 0) ? 0 : -1)); i = (f2 > ((float) 0) ? 1 : (f2 == ((float) 0) ? 0 : -1));
return h0.plus(e(this.l), h0.mapOf(d0.o.to("target_bitrate_max", Long.valueOf((i2 <= 0 || (valueOf3 = Float.valueOf(((float) (gVar.o * ((long) 8))) / f2)) == null) ? 0 : d0.a0.a.roundToLong(valueOf3.floatValue()))), d0.o.to("target_bitrate_network", Long.valueOf((i2 <= 0 || (valueOf2 = Float.valueOf(((float) (this.l.n * ((long) 8))) / f2)) == null) ? 0 : d0.a0.a.roundToLong(valueOf2.floatValue()))), d0.o.to("target_fps", Long.valueOf((i2 <= 0 || (valueOf = Float.valueOf(((float) this.l.m) / f2)) == null) ? 0 : d0.a0.a.roundToLong(valueOf.floatValue()))), d0.o.to("duration_encoder_nvidia_cuda", 0L), d0.o.to("duration_encoder_nvidia_direct3d", 0L), d0.o.to("duration_encoder_openh264", 0L), d0.o.to("duration_encoder_videotoolbox", 0L), d0.o.to("duration_encoder_amd_direct3d", 0L), d0.o.to("duration_encoder_intel", 0L), d0.o.to("duration_encoder_intel_direct3d", 0L), d0.o.to("duration_encoder_unknown", 0L))); return h0.plus(e(this.l), h0.mapOf(d0.o.to("target_bitrate_max", Long.valueOf((i <= 0 || (valueOf3 = Float.valueOf(((float) (fVar.o * ((long) 8))) / f2)) == null) ? 0 : d0.a0.a.roundToLong(valueOf3.floatValue()))), d0.o.to("target_bitrate_network", Long.valueOf((i <= 0 || (valueOf2 = Float.valueOf(((float) (this.l.n * ((long) 8))) / f2)) == null) ? 0 : d0.a0.a.roundToLong(valueOf2.floatValue()))), d0.o.to("target_fps", Long.valueOf((i <= 0 || (valueOf = Float.valueOf(((float) this.l.m) / f2)) == null) ? 0 : d0.a0.a.roundToLong(valueOf.floatValue()))), d0.o.to("duration_encoder_nvidia_cuda", 0L), d0.o.to("duration_encoder_nvidia_direct3d", 0L), d0.o.to("duration_encoder_openh264", 0L), d0.o.to("duration_encoder_videotoolbox", 0L), d0.o.to("duration_encoder_amd_direct3d", 0L), d0.o.to("duration_encoder_intel", 0L), d0.o.to("duration_encoder_intel_direct3d", 0L), d0.o.to("duration_encoder_unknown", 0L)));
} }
/* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x04e0: APUT /* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x04e0: APUT
@ -463,16 +456,16 @@ public final class e {
Long l = this.h; Long l = this.h;
float longValue = ((float) (l != null ? l.longValue() - this.g : currentTimeMillis - this.g)) / 1000.0f; float longValue = ((float) (l != null ? l.longValue() - this.g : currentTimeMillis - this.g)) / 1000.0f;
float f2 = ((float) eVar.f) / 1000.0f; float f2 = ((float) eVar.f) / 1000.0f;
int i2 = (f2 > ((float) 0) ? 1 : (f2 == ((float) 0) ? 0 : -1)); int i = (f2 > ((float) 0) ? 1 : (f2 == ((float) 0) ? 0 : -1));
long roundToLong = (i2 <= 0 || (valueOf = Float.valueOf(eVar.i / f2)) == null) ? 0 : d0.a0.a.roundToLong(valueOf.floatValue()); long roundToLong = (i <= 0 || (valueOf = Float.valueOf(eVar.i / f2)) == null) ? 0 : d0.a0.a.roundToLong(valueOf.floatValue());
Histogram.Report report = eVar.b.getReport(); Histogram.Report report = eVar.b.getReport();
Histogram.Report report2 = eVar.f232c.getReport(); Histogram.Report report2 = eVar.f232c.getReport();
b bVar = d; b bVar = d;
long j = (long) 1024; long j = (long) 1024;
Map mapOf = h0.mapOf(d0.o.to("duration", Double.valueOf(Math.floor((double) longValue))), c.d.b.a.a.Y(bVar, eVar.g.get(8000000), "duration_stream_under_8mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(7000000), "duration_stream_under_7mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(6000000), "duration_stream_under_6mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(5000000), "duration_stream_under_5mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(4000000), "duration_stream_under_4mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(3000000), "duration_stream_under_3mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(2000000), "duration_stream_under_2mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(1500000), "duration_stream_under_1_5mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(1000000), "duration_stream_under_1mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(500000), "duration_stream_under_0_5mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(0), "duration_stream_at_0mbps"), c.d.b.a.a.Y(bVar, eVar.h.get(60), "duration_fps_under_60"), c.d.b.a.a.Y(bVar, eVar.h.get(55), "duration_fps_under_55"), c.d.b.a.a.Y(bVar, eVar.h.get(50), "duration_fps_under_50"), c.d.b.a.a.Y(bVar, eVar.h.get(45), "duration_fps_under_45"), c.d.b.a.a.Y(bVar, eVar.h.get(40), "duration_fps_under_40"), c.d.b.a.a.Y(bVar, eVar.h.get(35), "duration_fps_under_35"), c.d.b.a.a.Y(bVar, eVar.h.get(30), "duration_fps_under_30"), c.d.b.a.a.Y(bVar, eVar.h.get(25), "duration_fps_under_25"), c.d.b.a.a.Y(bVar, eVar.h.get(20), "duration_fps_under_20"), c.d.b.a.a.Y(bVar, eVar.h.get(15), "duration_fps_under_15"), c.d.b.a.a.Y(bVar, eVar.h.get(10), "duration_fps_under_10"), c.d.b.a.a.Y(bVar, eVar.h.get(5), "duration_fps_under_5"), c.d.b.a.a.Y(bVar, eVar.h.get(0), "duration_fps_at_0"), d0.o.to("avg_resolution", Long.valueOf(roundToLong)), c.d.b.a.a.Y(bVar, eVar.j.get(720), "duration_resolution_under_720"), c.d.b.a.a.Y(bVar, eVar.j.get(480), "duration_resolution_under_480"), c.d.b.a.a.Y(bVar, eVar.j.get(360), "duration_resolution_under_360"), d0.o.to("num_pauses", 0), d0.o.to("duration_paused", Long.valueOf(b.a(bVar, Float.valueOf(((float) this.i.c(currentTimeMillis)) / 1000.0f)))), d0.o.to("duration_zero_receivers", Long.valueOf(b.a(bVar, Float.valueOf(((float) this.j.c(currentTimeMillis)) / 1000.0f)))), d0.o.to("duration_video_stopped", Long.valueOf(b.a(bVar, Float.valueOf(((float) this.k.c(currentTimeMillis)) / 1000.0f)))), d0.o.to("client_performance_cpu_percentile25", Long.valueOf(report.getPercentile25())), d0.o.to("client_performance_cpu_percentile50", Long.valueOf(report.getPercentile50())), d0.o.to("client_performance_cpu_percentile75", Long.valueOf(report.getPercentile75())), d0.o.to("client_performance_cpu_percentile90", Long.valueOf(report.getPercentile90())), d0.o.to("client_performance_cpu_percentile95", Long.valueOf(report.getPercentile95())), d0.o.to("client_performance_memory_percentile25", Long.valueOf(report2.getPercentile25() / j)), d0.o.to("client_performance_memory_percentile50", Long.valueOf(report2.getPercentile50() / j)), d0.o.to("client_performance_memory_percentile75", Long.valueOf(report2.getPercentile75() / j)), d0.o.to("client_performance_memory_percentile90", Long.valueOf(report2.getPercentile90() / j)), d0.o.to("client_performance_memory_percentile95", Long.valueOf(report2.getPercentile95() / j)), d0.o.to("client_performance_memory_min", Long.valueOf(report2.getMin() / j)), d0.o.to("client_performance_memory_max", Long.valueOf(report2.getMax() / j))); Map mapOf = h0.mapOf(d0.o.to("duration", Double.valueOf(Math.floor((double) longValue))), c.d.b.a.a.Y(bVar, eVar.g.get(8000000), "duration_stream_under_8mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(7000000), "duration_stream_under_7mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(6000000), "duration_stream_under_6mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(5000000), "duration_stream_under_5mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(4000000), "duration_stream_under_4mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(3000000), "duration_stream_under_3mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(2000000), "duration_stream_under_2mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(1500000), "duration_stream_under_1_5mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(1000000), "duration_stream_under_1mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(500000), "duration_stream_under_0_5mbps"), c.d.b.a.a.Y(bVar, eVar.g.get(0), "duration_stream_at_0mbps"), c.d.b.a.a.Y(bVar, eVar.h.get(60), "duration_fps_under_60"), c.d.b.a.a.Y(bVar, eVar.h.get(55), "duration_fps_under_55"), c.d.b.a.a.Y(bVar, eVar.h.get(50), "duration_fps_under_50"), c.d.b.a.a.Y(bVar, eVar.h.get(45), "duration_fps_under_45"), c.d.b.a.a.Y(bVar, eVar.h.get(40), "duration_fps_under_40"), c.d.b.a.a.Y(bVar, eVar.h.get(35), "duration_fps_under_35"), c.d.b.a.a.Y(bVar, eVar.h.get(30), "duration_fps_under_30"), c.d.b.a.a.Y(bVar, eVar.h.get(25), "duration_fps_under_25"), c.d.b.a.a.Y(bVar, eVar.h.get(20), "duration_fps_under_20"), c.d.b.a.a.Y(bVar, eVar.h.get(15), "duration_fps_under_15"), c.d.b.a.a.Y(bVar, eVar.h.get(10), "duration_fps_under_10"), c.d.b.a.a.Y(bVar, eVar.h.get(5), "duration_fps_under_5"), c.d.b.a.a.Y(bVar, eVar.h.get(0), "duration_fps_at_0"), d0.o.to("avg_resolution", Long.valueOf(roundToLong)), c.d.b.a.a.Y(bVar, eVar.j.get(720), "duration_resolution_under_720"), c.d.b.a.a.Y(bVar, eVar.j.get(480), "duration_resolution_under_480"), c.d.b.a.a.Y(bVar, eVar.j.get(360), "duration_resolution_under_360"), d0.o.to("num_pauses", 0), d0.o.to("duration_paused", Long.valueOf(b.a(bVar, Float.valueOf(((float) this.i.c(currentTimeMillis)) / 1000.0f)))), d0.o.to("duration_zero_receivers", Long.valueOf(b.a(bVar, Float.valueOf(((float) this.j.c(currentTimeMillis)) / 1000.0f)))), d0.o.to("duration_video_stopped", Long.valueOf(b.a(bVar, Float.valueOf(((float) this.k.c(currentTimeMillis)) / 1000.0f)))), d0.o.to("client_performance_cpu_percentile25", Long.valueOf(report.getPercentile25())), d0.o.to("client_performance_cpu_percentile50", Long.valueOf(report.getPercentile50())), d0.o.to("client_performance_cpu_percentile75", Long.valueOf(report.getPercentile75())), d0.o.to("client_performance_cpu_percentile90", Long.valueOf(report.getPercentile90())), d0.o.to("client_performance_cpu_percentile95", Long.valueOf(report.getPercentile95())), d0.o.to("client_performance_memory_percentile25", Long.valueOf(report2.getPercentile25() / j)), d0.o.to("client_performance_memory_percentile50", Long.valueOf(report2.getPercentile50() / j)), d0.o.to("client_performance_memory_percentile75", Long.valueOf(report2.getPercentile75() / j)), d0.o.to("client_performance_memory_percentile90", Long.valueOf(report2.getPercentile90() / j)), d0.o.to("client_performance_memory_percentile95", Long.valueOf(report2.getPercentile95() / j)), d0.o.to("client_performance_memory_min", Long.valueOf(report2.getMin() / j)), d0.o.to("client_performance_memory_max", Long.valueOf(report2.getMax() / j)));
a aVar = eVar.e; a aVar = eVar.e;
long a2 = i2 > 0 ? b.a(bVar, Float.valueOf(((float) (aVar.f * ((long) 8))) / f2)) : 0; long a2 = i > 0 ? b.a(bVar, Float.valueOf(((float) (aVar.f * ((long) 8))) / f2)) : 0;
long a3 = i2 > 0 ? b.a(bVar, Float.valueOf(((float) aVar.a) / f2)) : 0; long a3 = i > 0 ? b.a(bVar, Float.valueOf(((float) aVar.a) / f2)) : 0;
Pair[] pairArr = new Pair[11]; Pair[] pairArr = new Pair[11];
pairArr[0] = d0.o.to("avg_bitrate", Long.valueOf(a2)); pairArr[0] = d0.o.to("avg_bitrate", Long.valueOf(a2));
pairArr[1] = d0.o.to("avg_fps", Long.valueOf(a3)); pairArr[1] = d0.o.to("avg_fps", Long.valueOf(a3));
@ -489,8 +482,8 @@ public final class e {
return h0.plus(mapOf, h0.mapOf(pairArr)); return h0.plus(mapOf, h0.mapOf(pairArr));
} }
public final h f(InboundRtpVideo inboundRtpVideo, long j) { public final g f(InboundRtpVideo inboundRtpVideo, long j) {
return new h((long) inboundRtpVideo.getResolution().getHeight(), j, new a((long) inboundRtpVideo.getFramesDecoded(), (long) inboundRtpVideo.getFramesReceived(), (long) inboundRtpVideo.getPacketsReceived(), (long) inboundRtpVideo.getPacketsLost(), (long) inboundRtpVideo.getFramesDropped(), inboundRtpVideo.getBytesReceived(), inboundRtpVideo.getNackCount(), inboundRtpVideo.getPliCount(), inboundRtpVideo.getQpSum())); return new g((long) inboundRtpVideo.getResolution().getHeight(), j, new a((long) inboundRtpVideo.getFramesDecoded(), (long) inboundRtpVideo.getFramesReceived(), (long) inboundRtpVideo.getPacketsReceived(), (long) inboundRtpVideo.getPacketsLost(), (long) inboundRtpVideo.getFramesDropped(), inboundRtpVideo.getBytesReceived(), inboundRtpVideo.getNackCount(), inboundRtpVideo.getPliCount(), inboundRtpVideo.getQpSum()));
} }
public final void g(Boolean bool, Integer num, long j) { public final void g(Boolean bool, Integer num, long j) {

View file

@ -1,25 +0,0 @@
package c.a.q.o0;
import c.a.q.o0.e;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: VideoQuality.kt */
public final class g extends o implements Function1<e.f, Unit> {
public static final g i = new g();
public g() {
super(1);
}
/* 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 Unit invoke(e.f fVar) {
e.f fVar2 = fVar;
m.checkNotNullParameter(fVar2, "it");
fVar2.onFirstFrameSent();
return Unit.a;
}
}

View file

@ -1,28 +0,0 @@
package c.a.q.o0;
import c.a.q.o0.e;
import co.discord.media_engine.InboundRtpVideo;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: VideoQuality.kt */
public final class h extends o implements Function1<e.f, Unit> {
public final /* synthetic */ InboundRtpVideo $statsPerUser;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public h(InboundRtpVideo inboundRtpVideo) {
super(1);
this.$statsPerUser = inboundRtpVideo;
}
/* 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 Unit invoke(e.f fVar) {
e.f fVar2 = fVar;
m.checkNotNullParameter(fVar2, "it");
fVar2.onFirstFrameReceived(this.$statsPerUser.getSsrc());
return Unit.a;
}
}

View file

@ -4,23 +4,9 @@ import c.a.q.o0.e;
import com.discord.rtcconnection.RtcConnection; import com.discord.rtcconnection.RtcConnection;
/* compiled from: RtcConnection.kt */ /* compiled from: RtcConnection.kt */
public final class x extends e.c { public final class x extends e.c {
public final /* synthetic */ RtcConnection i; public final /* synthetic */ RtcConnection a;
public x(RtcConnection rtcConnection) { public x(RtcConnection rtcConnection) {
this.i = rtcConnection; this.a = rtcConnection;
}
@Override // c.a.q.o0.e.f
public void onFirstFrameReceived(long j) {
for (RtcConnection.c cVar : this.i.m) {
cVar.onFirstFrameReceived(j);
}
}
@Override // c.a.q.o0.e.f
public void onFirstFrameSent() {
for (RtcConnection.c cVar : this.i.m) {
cVar.onFirstFrameSent();
}
} }
} }

View file

@ -11,16 +11,29 @@ import com.discord.api.science.AnalyticsSchema;
import d0.z.d.m; import d0.z.d.m;
/* compiled from: TrackNetworkActionChannelCreate.kt */ /* compiled from: TrackNetworkActionChannelCreate.kt */
public final class TrackNetworkActionChannelCreate implements AnalyticsSchema, TrackBaseReceiver, TrackLocationMetadataReceiver, TrackNetworkMetadataReceiver { public final class TrackNetworkActionChannelCreate implements AnalyticsSchema, TrackBaseReceiver, TrackLocationMetadataReceiver, TrackNetworkMetadataReceiver {
private final transient String analyticsSchemaTypeName = "network_action_channel_create"; private final transient String analyticsSchemaTypeName;
private final Long channelId = null; private final Long channelId;
private final Long channelType = null; private final Long channelType;
private final Long guildId = null; private final Long guildId;
private final Boolean isPrivate = null; private final Boolean isPrivate;
private final Long parentId = null; private final Long parentId;
private TrackBase trackBase; private TrackBase trackBase;
private TrackLocationMetadata trackLocationMetadata; private TrackLocationMetadata trackLocationMetadata;
private TrackNetworkMetadata trackNetworkMetadata; private TrackNetworkMetadata trackNetworkMetadata;
public TrackNetworkActionChannelCreate() {
this(null, null, null, null, null);
}
public TrackNetworkActionChannelCreate(Boolean bool, Long l, Long l2, Long l3, Long l4) {
this.isPrivate = bool;
this.channelType = l;
this.channelId = l2;
this.parentId = l3;
this.guildId = l4;
this.analyticsSchemaTypeName = "network_action_channel_create";
}
@Override // com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver @Override // com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver
public void a(TrackNetworkMetadata trackNetworkMetadata) { public void a(TrackNetworkMetadata trackNetworkMetadata) {
this.trackNetworkMetadata = trackNetworkMetadata; this.trackNetworkMetadata = trackNetworkMetadata;

View file

@ -11,13 +11,25 @@ import com.discord.api.science.AnalyticsSchema;
import d0.z.d.m; import d0.z.d.m;
/* compiled from: TrackNetworkActionGuildCreate.kt */ /* compiled from: TrackNetworkActionGuildCreate.kt */
public final class TrackNetworkActionGuildCreate implements AnalyticsSchema, TrackBaseReceiver, TrackLocationMetadataReceiver, TrackNetworkMetadataReceiver { public final class TrackNetworkActionGuildCreate implements AnalyticsSchema, TrackBaseReceiver, TrackLocationMetadataReceiver, TrackNetworkMetadataReceiver {
private final transient String analyticsSchemaTypeName = "network_action_guild_create"; private final transient String analyticsSchemaTypeName;
private final Boolean isCommunityIntent = null; private final Boolean isCommunityIntent;
private final CharSequence templateName = null; private final CharSequence templateName;
private TrackBase trackBase; private TrackBase trackBase;
private TrackLocationMetadata trackLocationMetadata; private TrackLocationMetadata trackLocationMetadata;
private TrackNetworkMetadata trackNetworkMetadata; private TrackNetworkMetadata trackNetworkMetadata;
public TrackNetworkActionGuildCreate() {
this.templateName = null;
this.isCommunityIntent = null;
this.analyticsSchemaTypeName = "network_action_guild_create";
}
public TrackNetworkActionGuildCreate(CharSequence charSequence, Boolean bool) {
this.templateName = charSequence;
this.isCommunityIntent = null;
this.analyticsSchemaTypeName = "network_action_guild_create";
}
@Override // com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver @Override // com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver
public void a(TrackNetworkMetadata trackNetworkMetadata) { public void a(TrackNetworkMetadata trackNetworkMetadata) {
this.trackNetworkMetadata = trackNetworkMetadata; this.trackNetworkMetadata = trackNetworkMetadata;

View file

@ -11,23 +11,44 @@ import com.discord.api.science.AnalyticsSchema;
import d0.z.d.m; import d0.z.d.m;
/* compiled from: TrackNetworkActionInviteResolve.kt */ /* compiled from: TrackNetworkActionInviteResolve.kt */
public final class TrackNetworkActionInviteResolve implements AnalyticsSchema, TrackBaseReceiver, TrackLocationMetadataReceiver, TrackNetworkMetadataReceiver { public final class TrackNetworkActionInviteResolve implements AnalyticsSchema, TrackBaseReceiver, TrackLocationMetadataReceiver, TrackNetworkMetadataReceiver {
private final transient String analyticsSchemaTypeName = "network_action_invite_resolve"; private final transient String analyticsSchemaTypeName;
private final Boolean authenticated = null; private final Boolean authenticated;
private final Long channelId = null; private final Long channelId;
private final Long channelType = null; private final Long channelType;
private final CharSequence code = null; private final CharSequence code;
private final Long destinationUserId = null; private final Long destinationUserId;
private final Long guildId = null; private final Long guildId;
private final CharSequence inputValue = null; private final CharSequence inputValue;
private final CharSequence inviteType = null; private final CharSequence inviteType;
private final Long inviterId = null; private final Long inviterId;
private final Boolean resolved = null; private final Boolean resolved;
private final Long sizeOnline = null; private final Long sizeOnline;
private final Long sizeTotal = null; private final Long sizeTotal;
private TrackBase trackBase; private TrackBase trackBase;
private TrackLocationMetadata trackLocationMetadata; private TrackLocationMetadata trackLocationMetadata;
private TrackNetworkMetadata trackNetworkMetadata; private TrackNetworkMetadata trackNetworkMetadata;
private final Boolean userBanned = null; private final Boolean userBanned;
public TrackNetworkActionInviteResolve() {
this(null, null, null, null, null, null, null, null, null, null, null, null, null);
}
public TrackNetworkActionInviteResolve(Boolean bool, CharSequence charSequence, Boolean bool2, Long l, Long l2, Long l3, Long l4, Long l5, Long l6, CharSequence charSequence2, Long l7, Boolean bool3, CharSequence charSequence3) {
this.resolved = bool;
this.code = charSequence;
this.authenticated = bool2;
this.guildId = l;
this.channelId = l2;
this.channelType = l3;
this.inviterId = l4;
this.sizeTotal = l5;
this.sizeOnline = l6;
this.inviteType = charSequence2;
this.destinationUserId = l7;
this.userBanned = bool3;
this.inputValue = charSequence3;
this.analyticsSchemaTypeName = "network_action_invite_resolve";
}
@Override // com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver @Override // com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver
public void a(TrackNetworkMetadata trackNetworkMetadata) { public void a(TrackNetworkMetadata trackNetworkMetadata) {

View file

@ -26,9 +26,33 @@ public class ModelInvite implements Serializable {
private ModelMemberVerificationForm memberVerificationForm; private ModelMemberVerificationForm memberVerificationForm;
private boolean newMember; private boolean newMember;
private boolean revoked; private boolean revoked;
private int targetType;
private boolean temporary; private boolean temporary;
private int uses; private int uses;
public enum InviteTargetTypes {
STREAM(1, "Stream"),
EMBEDDED_APPLICATION(2, "Application"),
GDM(-1, "GDM Invite"),
SERVER(-1, "Server Invite");
private final int code;
private final String name;
private InviteTargetTypes(int i, String str) {
this.code = i;
this.name = str;
}
public static /* synthetic */ int access$000(InviteTargetTypes inviteTargetTypes) {
return inviteTargetTypes.code;
}
public static /* synthetic */ String access$100(InviteTargetTypes inviteTargetTypes) {
return inviteTargetTypes.name;
}
}
public static class Settings { public static class Settings {
public static final int[] EXPIRES_AFTER_ARRAY = {0, SEVEN_DAYS, 86400, TWELVE_HOURS, SIX_HOURS, 3600, HALF_HOUR}; public static final int[] EXPIRES_AFTER_ARRAY = {0, SEVEN_DAYS, 86400, TWELVE_HOURS, SIX_HOURS, 3600, HALF_HOUR};
public static final int HALF_HOUR = 1800; public static final int HALF_HOUR = 1800;
@ -132,6 +156,15 @@ public class ModelInvite implements Serializable {
return str + "?event=" + l; return str + "?event=" + l;
} }
private boolean isMultiUserDm(Channel channel) {
return channel.A() == 3;
}
private boolean isPublic(Channel channel) {
int A = channel.A();
return (A == 1 || A == 3) ? false : true;
}
public boolean canEqual(Object obj) { public boolean canEqual(Object obj) {
return obj instanceof ModelInvite; return obj instanceof ModelInvite;
} }
@ -145,7 +178,7 @@ public class ModelInvite implements Serializable {
return false; return false;
} }
ModelInvite modelInvite = (ModelInvite) obj; ModelInvite modelInvite = (ModelInvite) obj;
if (!modelInvite.canEqual(this) || getMaxAge() != modelInvite.getMaxAge() || isRevoked() != modelInvite.isRevoked() || isTemporary() != modelInvite.isTemporary() || getUses() != modelInvite.getUses() || getMaxUses() != modelInvite.getMaxUses() || getApproximatePresenceCount() != modelInvite.getApproximatePresenceCount() || getApproximateMemberCount() != modelInvite.getApproximateMemberCount() || isNewMember() != modelInvite.isNewMember() || isStatic() != modelInvite.isStatic()) { if (!modelInvite.canEqual(this) || getMaxAge() != modelInvite.getMaxAge() || isRevoked() != modelInvite.isRevoked() || isTemporary() != modelInvite.isTemporary() || getTargetType() != modelInvite.getTargetType() || getUses() != modelInvite.getUses() || getMaxUses() != modelInvite.getMaxUses() || getApproximatePresenceCount() != modelInvite.getApproximatePresenceCount() || getApproximateMemberCount() != modelInvite.getApproximateMemberCount() || isNewMember() != modelInvite.isNewMember() || isStatic() != modelInvite.isStatic()) {
return false; return false;
} }
User inviter = getInviter(); User inviter = getInviter();
@ -213,6 +246,29 @@ public class ModelInvite implements Serializable {
return this.guildScheduledEvent; return this.guildScheduledEvent;
} }
public String getInviteType() {
if (this.channel == null) {
return null;
}
int i = this.targetType;
InviteTargetTypes inviteTargetTypes = InviteTargetTypes.STREAM;
if (i == InviteTargetTypes.access$000(inviteTargetTypes)) {
return InviteTargetTypes.access$100(inviteTargetTypes);
}
int i2 = this.targetType;
InviteTargetTypes inviteTargetTypes2 = InviteTargetTypes.EMBEDDED_APPLICATION;
if (i2 == InviteTargetTypes.access$000(inviteTargetTypes2)) {
return InviteTargetTypes.access$100(inviteTargetTypes2);
}
if (isMultiUserDm(this.channel)) {
return InviteTargetTypes.access$100(InviteTargetTypes.GDM);
}
if (isPublic(this.channel)) {
return InviteTargetTypes.access$100(InviteTargetTypes.SERVER);
}
return null;
}
public User getInviter() { public User getInviter() {
return this.inviter; return this.inviter;
} }
@ -229,6 +285,10 @@ public class ModelInvite implements Serializable {
return this.memberVerificationForm; return this.memberVerificationForm;
} }
public int getTargetType() {
return this.targetType;
}
public long getTimeToExpirationMillis() { public long getTimeToExpirationMillis() {
return getExpirationTime() - ClockFactory.get().currentTimeMillis(); return getExpirationTime() - ClockFactory.get().currentTimeMillis();
} }
@ -240,7 +300,7 @@ public class ModelInvite implements Serializable {
@Override // java.lang.Object @Override // java.lang.Object
public int hashCode() { public int hashCode() {
int i = 79; int i = 79;
int approximateMemberCount = (((getApproximateMemberCount() + ((getApproximatePresenceCount() + ((getMaxUses() + ((getUses() + ((((((getMaxAge() + 59) * 59) + (isRevoked() ? 79 : 97)) * 59) + (isTemporary() ? 79 : 97)) * 59)) * 59)) * 59)) * 59)) * 59) + (isNewMember() ? 79 : 97)) * 59; int approximateMemberCount = (((getApproximateMemberCount() + ((getApproximatePresenceCount() + ((getMaxUses() + ((getUses() + ((getTargetType() + ((((((getMaxAge() + 59) * 59) + (isRevoked() ? 79 : 97)) * 59) + (isTemporary() ? 79 : 97)) * 59)) * 59)) * 59)) * 59)) * 59)) * 59) + (isNewMember() ? 79 : 97)) * 59;
if (!isStatic()) { if (!isStatic()) {
i = 97; i = 97;
} }
@ -315,6 +375,8 @@ public class ModelInvite implements Serializable {
P.append(isRevoked()); P.append(isRevoked());
P.append(", temporary="); P.append(", temporary=");
P.append(isTemporary()); P.append(isTemporary());
P.append(", targetType=");
P.append(getTargetType());
P.append(", uses="); P.append(", uses=");
P.append(getUses()); P.append(getUses());
P.append(", maxUses="); P.append(", maxUses=");

View file

@ -91,6 +91,7 @@ public final class RestAPIAbortCodes {
public static final int UNKNOWN_TOKEN = 10012; public static final int UNKNOWN_TOKEN = 10012;
public static final int UNKNOWN_USER = 10013; public static final int UNKNOWN_USER = 10013;
public static final int UNKNOWN_WEBHOOK = 10015; public static final int UNKNOWN_WEBHOOK = 10015;
public static final int USER_BANNED = 40007;
private RestAPIAbortCodes() { private RestAPIAbortCodes() {
} }

View file

@ -296,10 +296,10 @@ public interface RestAPIInterface {
Observable<ModelConnectedAccount> createConnectionContacts(@a RestAPIParams.ConnectedAccountContacts connectedAccountContacts); Observable<ModelConnectedAccount> createConnectionContacts(@a RestAPIParams.ConnectedAccountContacts connectedAccountContacts);
@i0.f0.o("guilds") @i0.f0.o("guilds")
Observable<Guild> createGuild(@a RestAPIParams.CreateGuild createGuild); Observable<Response<Guild>> createGuild(@a RestAPIParams.CreateGuild createGuild);
@i0.f0.o("guilds/{guildId}/channels") @i0.f0.o("guilds/{guildId}/channels")
Observable<Channel> createGuildChannel(@s("guildId") long j, @a RestAPIParams.CreateGuildChannel createGuildChannel); Observable<Response<Channel>> createGuildChannel(@s("guildId") long j, @a RestAPIParams.CreateGuildChannel createGuildChannel);
@i0.f0.o("guilds/templates/{guildTemplateCode}") @i0.f0.o("guilds/templates/{guildTemplateCode}")
Observable<Guild> createGuildFromTemplate(@s("guildTemplateCode") String str, @a RestAPIParams.CreateGuildFromTemplate createGuildFromTemplate); Observable<Guild> createGuildFromTemplate(@s("guildTemplateCode") String str, @a RestAPIParams.CreateGuildFromTemplate createGuildFromTemplate);
@ -425,7 +425,7 @@ public interface RestAPIInterface {
Observable<Unit> endStageInstance(@s("channelId") long j); Observable<Unit> endStageInstance(@s("channelId") long j);
@i0.f0.o("auth/forgot") @i0.f0.o("auth/forgot")
Observable<Void> forgotPassword(@a RestAPIParams.ForgotPassword forgotPassword); Observable<Response<Void>> forgotPassword(@a RestAPIParams.ForgotPassword forgotPassword);
@i0.f0.o("users/@me/entitlements/gift-codes") @i0.f0.o("users/@me/entitlements/gift-codes")
Observable<ModelGift> generateGiftCode(@a RestAPIParams.GenerateGiftCode generateGiftCode); Observable<ModelGift> generateGiftCode(@a RestAPIParams.GenerateGiftCode generateGiftCode);
@ -563,7 +563,7 @@ public interface RestAPIInterface {
Observable<ApplicationCommandData> getInteractionData(@s("channelId") long j, @s("messageId") long j2); Observable<ApplicationCommandData> getInteractionData(@s("channelId") long j, @s("messageId") long j2);
@f("invites/{code}") @f("invites/{code}")
Observable<ModelInvite> getInviteCode(@s("code") String str, @t("with_counts") boolean z2, @t("guild_scheduled_event_id") Long l); Observable<Response<ModelInvite>> getInviteCode(@s("code") String str, @t("with_counts") boolean z2, @t("guild_scheduled_event_id") Long l);
@i0.f0.o("users/@me/billing/invoices/preview") @i0.f0.o("users/@me/billing/invoices/preview")
Observable<ModelInvoicePreview> getInvoicePreview(@a RestAPIParams.InvoicePreviewBody invoicePreviewBody); Observable<ModelInvoicePreview> getInvoicePreview(@a RestAPIParams.InvoicePreviewBody invoicePreviewBody);
@ -692,7 +692,7 @@ public interface RestAPIInterface {
Observable<Void> leaveThread(@s("channelId") long j, @t("location") String str); Observable<Void> leaveThread(@s("channelId") long j, @t("location") String str);
@i0.f0.o("auth/logout") @i0.f0.o("auth/logout")
Observable<Void> logout(@a RestAPIParams.UserDevices userDevices); Observable<Response<Void>> logout(@a RestAPIParams.UserDevices userDevices);
@n("channels/{channelId}/directory-entry/{guildId}") @n("channels/{channelId}/directory-entry/{guildId}")
Observable<DirectoryEntry> modifyServerInHub(@s("channelId") long j, @s("guildId") long j2, @a RestAPIParams.AddServerBody addServerBody); Observable<DirectoryEntry> modifyServerInHub(@s("channelId") long j, @s("guildId") long j2, @a RestAPIParams.AddServerBody addServerBody);
@ -710,7 +710,7 @@ public interface RestAPIInterface {
Observable<Void> phoneVerificationsResend(@a RestAPIParams.VerificationCodeResend verificationCodeResend); Observable<Void> phoneVerificationsResend(@a RestAPIParams.VerificationCodeResend verificationCodeResend);
@i0.f0.o("phone-verifications/verify") @i0.f0.o("phone-verifications/verify")
Observable<ModelPhoneVerificationToken> phoneVerificationsVerify(@a RestAPIParams.VerificationCode verificationCode); Observable<Response<ModelPhoneVerificationToken>> phoneVerificationsVerify(@a RestAPIParams.VerificationCode verificationCode);
@i0.f0.o("auth/fingerprint") @i0.f0.o("auth/fingerprint")
Observable<FingerprintResponse> postAuthFingerprint(@a RestAPIParams.EmptyBody emptyBody); Observable<FingerprintResponse> postAuthFingerprint(@a RestAPIParams.EmptyBody emptyBody);
@ -946,7 +946,7 @@ public interface RestAPIInterface {
Observable<VanityUrlResponse> updateVanityUrl(@s("guildId") long j, @a RestAPIParams.VanityUrl vanityUrl); Observable<VanityUrlResponse> updateVanityUrl(@s("guildId") long j, @a RestAPIParams.VanityUrl vanityUrl);
@p("users/@me/connections/contacts/@me/external-friend-list-entries") @p("users/@me/connections/contacts/@me/external-friend-list-entries")
Observable<BulkFriendSuggestions> uploadContacts(@a RestAPIParams.UploadContacts uploadContacts); Observable<Response<BulkFriendSuggestions>> uploadContacts(@a RestAPIParams.UploadContacts uploadContacts);
@i0.f0.o("debug-logs/4/{filename}") @i0.f0.o("debug-logs/4/{filename}")
Observable<Void> uploadLog(@s("filename") String str, @a String str2); Observable<Void> uploadLog(@s("filename") String str, @a String str2);

View file

@ -11,7 +11,6 @@ import c.a.q.g;
import c.a.q.g0; import c.a.q.g0;
import c.a.q.h0; import c.a.q.h0;
import c.a.q.j; import c.a.q.j;
import c.a.q.o0.e;
import c.a.q.p; import c.a.q.p;
import c.a.q.q; import c.a.q.q;
import c.a.q.r; import c.a.q.r;
@ -50,7 +49,7 @@ import rx.Observable;
import rx.Subscription; import rx.Subscription;
import rx.subjects.BehaviorSubject; import rx.subjects.BehaviorSubject;
/* compiled from: RtcConnection.kt */ /* compiled from: RtcConnection.kt */
public final class RtcConnection implements DebugPrintable, MediaSinkWantsManager.a, e.f { public final class RtcConnection implements DebugPrintable, MediaSinkWantsManager.a {
public static int i; public static int i;
public static final a j = new a(null); public static final a j = new a(null);
public final c.a.q.o0.e A; public final c.a.q.o0.e A;
@ -372,11 +371,9 @@ public final class RtcConnection implements DebugPrintable, MediaSinkWantsManage
public void onFatalClose() { public void onFatalClose() {
} }
@Override // c.a.q.o0.e.f
public void onFirstFrameReceived(long j) { public void onFirstFrameReceived(long j) {
} }
@Override // c.a.q.o0.e.f
public void onFirstFrameSent() { public void onFirstFrameSent() {
} }
@ -417,7 +414,7 @@ public final class RtcConnection implements DebugPrintable, MediaSinkWantsManage
} }
/* compiled from: RtcConnection.kt */ /* compiled from: RtcConnection.kt */
public interface c extends e.f { public interface c {
void onAnalyticsEvent(AnalyticsEvent analyticsEvent, Map<String, Object> map); void onAnalyticsEvent(AnalyticsEvent analyticsEvent, Map<String, Object> map);
void onFatalClose(); void onFatalClose();
@ -855,20 +852,6 @@ public final class RtcConnection implements DebugPrintable, MediaSinkWantsManage
} }
} }
@Override // c.a.q.o0.e.f
public void onFirstFrameReceived(long j2) {
for (c cVar : this.m) {
cVar.onFirstFrameReceived(j2);
}
}
@Override // c.a.q.o0.e.f
public void onFirstFrameSent() {
for (c cVar : this.m) {
cVar.onFirstFrameSent();
}
}
public final void p(AnalyticsEvent analyticsEvent, Map<String, Object> map) { public final void p(AnalyticsEvent analyticsEvent, Map<String, Object> map) {
String str; String str;
map.put("rtc_connection_id", this.l); map.put("rtc_connection_id", this.l);

View file

@ -22,7 +22,7 @@ public final class ConnectionTimeStats$addListener$2 extends StoreRtcConnection.
ConnectionTimeStats.Stat.start$default(ConnectionTimeStats.access$getConnectionStreamFirstFrame$p(this.this$0), false, 1, null); ConnectionTimeStats.Stat.start$default(ConnectionTimeStats.access$getConnectionStreamFirstFrame$p(this.this$0), false, 1, null);
} }
@Override // com.discord.stores.StoreRtcConnection.DefaultListener, com.discord.stores.StoreRtcConnection.Listener, c.a.q.o0.e.f @Override // com.discord.stores.StoreRtcConnection.DefaultListener, com.discord.stores.StoreRtcConnection.Listener
public void onFirstFrameReceived(long j) { public void onFirstFrameReceived(long j) {
ConnectionTimeStats.Stat.end$default(ConnectionTimeStats.access$getVideoFirstFrame$p(this.this$0), false, 1, null); ConnectionTimeStats.Stat.end$default(ConnectionTimeStats.access$getVideoFirstFrame$p(this.this$0), false, 1, null);
ConnectionTimeStats.Stat.end$default(ConnectionTimeStats.access$getConnectionVideoFirstFrame$p(this.this$0), false, 1, null); ConnectionTimeStats.Stat.end$default(ConnectionTimeStats.access$getConnectionVideoFirstFrame$p(this.this$0), false, 1, null);

View file

@ -22,7 +22,7 @@ public final class ConnectionTimeStats$addListener$3 extends StoreStreamRtcConne
ConnectionTimeStats.Stat.start$default(ConnectionTimeStats.access$getStreamConnection$p(this.this$0), false, 1, null); ConnectionTimeStats.Stat.start$default(ConnectionTimeStats.access$getStreamConnection$p(this.this$0), false, 1, null);
} }
@Override // com.discord.stores.StoreStreamRtcConnection.DefaultListener, com.discord.stores.StoreStreamRtcConnection.Listener, c.a.q.o0.e.f @Override // com.discord.stores.StoreStreamRtcConnection.DefaultListener, com.discord.stores.StoreStreamRtcConnection.Listener
public void onFirstFrameReceived(long j) { public void onFirstFrameReceived(long j) {
ConnectionTimeStats.Stat.end$default(ConnectionTimeStats.access$getStreamFirstFrame$p(this.this$0), false, 1, null); ConnectionTimeStats.Stat.end$default(ConnectionTimeStats.access$getStreamFirstFrame$p(this.this$0), false, 1, null);
ConnectionTimeStats.Stat.end$default(ConnectionTimeStats.access$getConnectionStreamFirstFrame$p(this.this$0), false, 1, null); ConnectionTimeStats.Stat.end$default(ConnectionTimeStats.access$getConnectionStreamFirstFrame$p(this.this$0), false, 1, null);

View file

@ -0,0 +1,18 @@
package com.discord.stores;
import com.discord.analytics.generated.events.network_action.TrackNetworkActionForgotPassword;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import d0.z.d.o;
import kotlin.jvm.functions.Function1;
/* compiled from: StoreAuthentication.kt */
public final class StoreAuthentication$forgotPassword$1 extends o implements Function1<Void, TrackNetworkMetadataReceiver> {
public static final StoreAuthentication$forgotPassword$1 INSTANCE = new StoreAuthentication$forgotPassword$1();
public StoreAuthentication$forgotPassword$1() {
super(1);
}
public final TrackNetworkMetadataReceiver invoke(Void r1) {
return new TrackNetworkActionForgotPassword();
}
}

View file

@ -1,16 +1,18 @@
package com.discord.stores; package com.discord.stores;
import j0.k.b; import com.discord.analytics.generated.events.network_action.TrackNetworkActionUserLogout;
import rx.Observable; import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import d0.z.d.o;
import kotlin.jvm.functions.Function1;
/* compiled from: StoreAuthentication.kt */ /* compiled from: StoreAuthentication.kt */
public final class StoreAuthentication$logout$1<T, R> implements b<Void, Observable<? extends String>> { public final class StoreAuthentication$logout$1 extends o implements Function1<Void, TrackNetworkMetadataReceiver> {
public final /* synthetic */ StoreAuthentication this$0; public static final StoreAuthentication$logout$1 INSTANCE = new StoreAuthentication$logout$1();
public StoreAuthentication$logout$1(StoreAuthentication storeAuthentication) { public StoreAuthentication$logout$1() {
this.this$0 = storeAuthentication; super(1);
} }
public final Observable<? extends String> call(Void r1) { public final TrackNetworkMetadataReceiver invoke(Void r1) {
return StoreAuthentication.access$getFingerprintSnapshotOrGenerate(this.this$0); return new TrackNetworkActionUserLogout();
} }
} }

View file

@ -1,28 +1,16 @@
package com.discord.stores; package com.discord.stores;
import d0.z.d.o; import j0.k.b;
import kotlin.Unit; import rx.Observable;
import kotlin.jvm.functions.Function1;
/* compiled from: StoreAuthentication.kt */ /* compiled from: StoreAuthentication.kt */
public final class StoreAuthentication$logout$2 extends o implements Function1<String, Unit> { public final class StoreAuthentication$logout$2<T, R> implements b<Void, Observable<? extends String>> {
public final /* synthetic */ StoreAuthentication this$0; public final /* synthetic */ StoreAuthentication this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreAuthentication$logout$2(StoreAuthentication storeAuthentication) { public StoreAuthentication$logout$2(StoreAuthentication storeAuthentication) {
super(1);
this.this$0 = storeAuthentication; this.this$0 = storeAuthentication;
} }
/* Return type fixed from 'java.lang.Object' to match base method */ public final Observable<? extends String> call(Void r1) {
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ return StoreAuthentication.access$getFingerprintSnapshotOrGenerate(this.this$0);
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(String str) {
invoke(str);
return Unit.a;
}
public final void invoke(String str) {
StoreStream.Companion.getNux().clearNux();
this.this$0.setAuthed(null);
} }
} }

View file

@ -1,12 +1,10 @@
package com.discord.stores; package com.discord.stores;
import com.discord.utilities.error.Error;
import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: StoreAuthentication.kt */ /* compiled from: StoreAuthentication.kt */
public final class StoreAuthentication$logout$3 extends o implements Function1<Error, Unit> { public final class StoreAuthentication$logout$3 extends o implements Function1<String, Unit> {
public final /* synthetic */ StoreAuthentication this$0; public final /* synthetic */ StoreAuthentication this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -18,13 +16,13 @@ public final class StoreAuthentication$logout$3 extends o implements Function1<E
/* Return type fixed from 'java.lang.Object' to match base method */ /* 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] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1 @Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Error error) { public /* bridge */ /* synthetic */ Unit invoke(String str) {
invoke(error); invoke(str);
return Unit.a; return Unit.a;
} }
public final void invoke(Error error) { public final void invoke(String str) {
m.checkNotNullParameter(error, "it"); StoreStream.Companion.getNux().clearNux();
this.this$0.setAuthed(null); this.this$0.setAuthed(null);
} }
} }

View file

@ -0,0 +1,30 @@
package com.discord.stores;
import com.discord.utilities.error.Error;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: StoreAuthentication.kt */
public final class StoreAuthentication$logout$4 extends o implements Function1<Error, Unit> {
public final /* synthetic */ StoreAuthentication this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreAuthentication$logout$4(StoreAuthentication storeAuthentication) {
super(1);
this.this$0 = storeAuthentication;
}
/* 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(Error error) {
invoke(error);
return Unit.a;
}
public final void invoke(Error error) {
m.checkNotNullParameter(error, "it");
this.this$0.setAuthed(null);
}
}

View file

@ -258,7 +258,7 @@ public final class StoreAuthentication extends Store {
public final Observable<Void> forgotPassword(String str, String str2) { public final Observable<Void> forgotPassword(String str, String str2) {
m.checkNotNullParameter(str, "login"); m.checkNotNullParameter(str, "login");
return ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().forgotPassword(new RestAPIParams.ForgotPassword(str, str2)), false, 1, null); return ObservableExtensionsKt.restSubscribeOn$default(RestCallStateKt.logNetworkAction(RestAPI.Companion.getApi().forgotPassword(new RestAPIParams.ForgotPassword(str, str2)), StoreAuthentication$forgotPassword$1.INSTANCE), false, 1, null);
} }
public final Observable<String> getAgeGateError() { public final Observable<String> getAgeGateError() {
@ -387,9 +387,9 @@ public final class StoreAuthentication extends Store {
public final void logout() { public final void logout() {
PublishSubject<Boolean> publishSubject = this.userInitiatedAuthEventSubject; PublishSubject<Boolean> publishSubject = this.userInitiatedAuthEventSubject;
publishSubject.j.onNext(Boolean.FALSE); publishSubject.j.onNext(Boolean.FALSE);
Observable z2 = ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().logout(new RestAPIParams.UserDevices(StoreStream.Companion.getNotifications().getPushToken())), false, 1, null).z(new StoreAuthentication$logout$1(this)); Observable z2 = ObservableExtensionsKt.restSubscribeOn$default(RestCallStateKt.logNetworkAction(RestAPI.Companion.getApi().logout(new RestAPIParams.UserDevices(StoreStream.Companion.getNotifications().getPushToken())), StoreAuthentication$logout$1.INSTANCE), false, 1, null).z(new StoreAuthentication$logout$2(this));
m.checkNotNullExpressionValue(z2, "RestAPI\n .api\n …intSnapshotOrGenerate() }"); m.checkNotNullExpressionValue(z2, "RestAPI\n .api\n …intSnapshotOrGenerate() }");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.takeSingleUntilTimeout$default(z2, 0, false, 3, null), (Context) null, "logout", (Function1) null, new StoreAuthentication$logout$2(this), new StoreAuthentication$logout$3(this), (Function0) null, (Function0) null, 101, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.takeSingleUntilTimeout$default(z2, 0, false, 3, null), (Context) null, "logout", (Function1) null, new StoreAuthentication$logout$3(this), new StoreAuthentication$logout$4(this), (Function0) null, (Function0) null, 101, (Object) null);
} }
public final Observable<Boolean> observeIsAuthed$app_productionCanaryRelease() { public final Observable<Boolean> observeIsAuthed$app_productionCanaryRelease() {

View file

@ -0,0 +1,19 @@
package com.discord.stores;
import com.discord.analytics.generated.events.network_action.TrackNetworkActionUserContactsSync;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.api.friendsuggestions.BulkFriendSuggestions;
import d0.z.d.o;
import kotlin.jvm.functions.Function1;
/* compiled from: StoreContactSync.kt */
public final class StoreContactSync$backgroundUploadContacts$1 extends o implements Function1<BulkFriendSuggestions, TrackNetworkMetadataReceiver> {
public static final StoreContactSync$backgroundUploadContacts$1 INSTANCE = new StoreContactSync$backgroundUploadContacts$1();
public StoreContactSync$backgroundUploadContacts$1() {
super(1);
}
public final TrackNetworkMetadataReceiver invoke(BulkFriendSuggestions bulkFriendSuggestions) {
return new TrackNetworkActionUserContactsSync();
}
}

View file

@ -7,6 +7,7 @@ import com.discord.models.experiments.domain.Experiment;
import com.discord.models.user.MeUser; import com.discord.models.user.MeUser;
import com.discord.restapi.RestAPIParams; import com.discord.restapi.RestAPIParams;
import com.discord.stores.StoreNotices; import com.discord.stores.StoreNotices;
import com.discord.stores.utilities.RestCallStateKt;
import com.discord.utilities.contacts.ContactsFetcher; import com.discord.utilities.contacts.ContactsFetcher;
import com.discord.utilities.persister.Persister; import com.discord.utilities.persister.Persister;
import com.discord.utilities.rest.RestAPI; import com.discord.utilities.rest.RestAPI;
@ -69,7 +70,7 @@ public final class StoreContactSync extends StoreV2 {
for (String str : fetchContacts) { for (String str : fetchContacts) {
arrayList.add(new RestAPIParams.ContactEntry(str, str, g0.mapOf(new Pair("number", str)))); arrayList.add(new RestAPIParams.ContactEntry(str, str, g0.mapOf(new Pair("number", str))));
} }
this.restAPI.uploadContacts(new RestAPIParams.UploadContacts(arrayList, true, AllowedInSuggestionsType.ANYONE_WITH_CONTACT_INFO)); RestCallStateKt.logNetworkAction(this.restAPI.uploadContacts(new RestAPIParams.UploadContacts(arrayList, true, AllowedInSuggestionsType.ANYONE_WITH_CONTACT_INFO)), StoreContactSync$backgroundUploadContacts$1.INSTANCE);
setContactSyncUploadTimestamp(this.clock.currentTimeMillis()); setContactSyncUploadTimestamp(this.clock.currentTimeMillis());
} }

View file

@ -1,9 +1,16 @@
package com.discord.stores; package com.discord.stores;
import android.content.Context; import android.content.Context;
import com.discord.analytics.generated.events.network_action.TrackNetworkActionInviteResolve;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.api.channel.Channel;
import com.discord.api.guild.Guild;
import com.discord.api.guildscheduledevent.GuildScheduledEvent; import com.discord.api.guildscheduledevent.GuildScheduledEvent;
import com.discord.api.user.User;
import com.discord.models.domain.ModelInvite; import com.discord.models.domain.ModelInvite;
import com.discord.restapi.RestAPIAbortCodes;
import com.discord.stores.StoreInstantInvites; import com.discord.stores.StoreInstantInvites;
import com.discord.stores.utilities.RestCallStateKt;
import com.discord.utilities.analytics.AnalyticsTracker; import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.error.Error; import com.discord.utilities.error.Error;
import com.discord.utilities.rx.ObservableExtensionsKt; import com.discord.utilities.rx.ObservableExtensionsKt;
@ -17,22 +24,44 @@ public final class StoreInstantInvites$fetchInviteIfNotLoaded$1 extends o implem
public final /* synthetic */ Long $eventId; public final /* synthetic */ Long $eventId;
public final /* synthetic */ String $inviteCode; public final /* synthetic */ String $inviteCode;
public final /* synthetic */ String $inviteKey; public final /* synthetic */ String $inviteKey;
public final /* synthetic */ Boolean $inviteResolved;
public final /* synthetic */ String $location; public final /* synthetic */ String $location;
public final /* synthetic */ StoreInstantInvites this$0; public final /* synthetic */ StoreInstantInvites this$0;
/* compiled from: StoreInstantInvites.kt */ /* compiled from: StoreInstantInvites.kt */
/* renamed from: com.discord.stores.StoreInstantInvites$fetchInviteIfNotLoaded$1$1 reason: invalid class name */ /* renamed from: com.discord.stores.StoreInstantInvites$fetchInviteIfNotLoaded$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function1<ModelInvite, Unit> { public static final class AnonymousClass1 extends o implements Function1<ModelInvite, TrackNetworkMetadataReceiver> {
public final /* synthetic */ StoreInstantInvites$fetchInviteIfNotLoaded$1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(StoreInstantInvites$fetchInviteIfNotLoaded$1 storeInstantInvites$fetchInviteIfNotLoaded$1) {
super(1);
this.this$0 = storeInstantInvites$fetchInviteIfNotLoaded$1;
}
public final TrackNetworkMetadataReceiver invoke(ModelInvite modelInvite) {
User inviter;
Channel channel;
Channel channel2;
Guild guild;
StoreInstantInvites$fetchInviteIfNotLoaded$1 storeInstantInvites$fetchInviteIfNotLoaded$1 = this.this$0;
return new TrackNetworkActionInviteResolve(storeInstantInvites$fetchInviteIfNotLoaded$1.$inviteResolved, storeInstantInvites$fetchInviteIfNotLoaded$1.$inviteCode, Boolean.valueOf(StoreStream.Companion.getAuthentication().isAuthed()), (modelInvite == null || (guild = modelInvite.getGuild()) == null) ? null : Long.valueOf(guild.p()), (modelInvite == null || (channel2 = modelInvite.getChannel()) == null) ? null : Long.valueOf(channel2.h()), (modelInvite == null || (channel = modelInvite.getChannel()) == null) ? null : Long.valueOf((long) channel.A()), (modelInvite == null || (inviter = modelInvite.getInviter()) == null) ? null : Long.valueOf(inviter.i()), modelInvite != null ? Long.valueOf((long) modelInvite.getApproximateMemberCount()) : null, modelInvite != null ? Long.valueOf((long) modelInvite.getApproximatePresenceCount()) : null, modelInvite != null ? modelInvite.getInviteType() : null, null, modelInvite != null ? Boolean.valueOf(m.areEqual(modelInvite.code, String.valueOf((int) RestAPIAbortCodes.USER_BANNED))) : null, null);
}
}
/* compiled from: StoreInstantInvites.kt */
/* renamed from: com.discord.stores.StoreInstantInvites$fetchInviteIfNotLoaded$1$2 reason: invalid class name */
public static final class AnonymousClass2 extends o implements Function1<ModelInvite, Unit> {
public final /* synthetic */ StoreInstantInvites$fetchInviteIfNotLoaded$1 this$0; public final /* synthetic */ StoreInstantInvites$fetchInviteIfNotLoaded$1 this$0;
/* compiled from: StoreInstantInvites.kt */ /* compiled from: StoreInstantInvites.kt */
/* renamed from: com.discord.stores.StoreInstantInvites$fetchInviteIfNotLoaded$1$1$1 reason: invalid class name */ /* renamed from: com.discord.stores.StoreInstantInvites$fetchInviteIfNotLoaded$1$2$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function0<Unit> { public static final class AnonymousClass1 extends o implements Function0<Unit> {
public final /* synthetic */ ModelInvite $it; public final /* synthetic */ ModelInvite $it;
public final /* synthetic */ AnonymousClass1 this$0; public final /* synthetic */ AnonymousClass2 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(AnonymousClass1 r1, ModelInvite modelInvite) { public AnonymousClass1(AnonymousClass2 r1, ModelInvite modelInvite) {
super(0); super(0);
this.this$0 = r1; this.this$0 = r1;
this.$it = modelInvite; this.$it = modelInvite;
@ -56,7 +85,7 @@ public final class StoreInstantInvites$fetchInviteIfNotLoaded$1 extends o implem
} }
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(StoreInstantInvites$fetchInviteIfNotLoaded$1 storeInstantInvites$fetchInviteIfNotLoaded$1) { public AnonymousClass2(StoreInstantInvites$fetchInviteIfNotLoaded$1 storeInstantInvites$fetchInviteIfNotLoaded$1) {
super(1); super(1);
this.this$0 = storeInstantInvites$fetchInviteIfNotLoaded$1; this.this$0 = storeInstantInvites$fetchInviteIfNotLoaded$1;
} }
@ -80,17 +109,17 @@ public final class StoreInstantInvites$fetchInviteIfNotLoaded$1 extends o implem
} }
/* compiled from: StoreInstantInvites.kt */ /* compiled from: StoreInstantInvites.kt */
/* renamed from: com.discord.stores.StoreInstantInvites$fetchInviteIfNotLoaded$1$2 reason: invalid class name */ /* renamed from: com.discord.stores.StoreInstantInvites$fetchInviteIfNotLoaded$1$3 reason: invalid class name */
public static final class AnonymousClass2 extends o implements Function1<Error, Unit> { public static final class AnonymousClass3 extends o implements Function1<Error, Unit> {
public final /* synthetic */ StoreInstantInvites$fetchInviteIfNotLoaded$1 this$0; public final /* synthetic */ StoreInstantInvites$fetchInviteIfNotLoaded$1 this$0;
/* compiled from: StoreInstantInvites.kt */ /* compiled from: StoreInstantInvites.kt */
/* renamed from: com.discord.stores.StoreInstantInvites$fetchInviteIfNotLoaded$1$2$1 reason: invalid class name */ /* renamed from: com.discord.stores.StoreInstantInvites$fetchInviteIfNotLoaded$1$3$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function0<Unit> { public static final class AnonymousClass1 extends o implements Function0<Unit> {
public final /* synthetic */ AnonymousClass2 this$0; public final /* synthetic */ AnonymousClass3 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(AnonymousClass2 r1) { public AnonymousClass1(AnonymousClass3 r1) {
super(0); super(0);
this.this$0 = r1; this.this$0 = r1;
} }
@ -107,12 +136,12 @@ public final class StoreInstantInvites$fetchInviteIfNotLoaded$1 extends o implem
} }
/* compiled from: StoreInstantInvites.kt */ /* compiled from: StoreInstantInvites.kt */
/* renamed from: com.discord.stores.StoreInstantInvites$fetchInviteIfNotLoaded$1$2$2 reason: invalid class name */ /* renamed from: com.discord.stores.StoreInstantInvites$fetchInviteIfNotLoaded$1$3$2 reason: invalid class name */
public static final class AnonymousClass2 extends o implements Function0<Unit> { public static final class AnonymousClass2 extends o implements Function0<Unit> {
public final /* synthetic */ AnonymousClass2 this$0; public final /* synthetic */ AnonymousClass3 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass2(AnonymousClass2 r1) { public AnonymousClass2(AnonymousClass3 r1) {
super(0); super(0);
this.this$0 = r1; this.this$0 = r1;
} }
@ -129,7 +158,7 @@ public final class StoreInstantInvites$fetchInviteIfNotLoaded$1 extends o implem
} }
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass2(StoreInstantInvites$fetchInviteIfNotLoaded$1 storeInstantInvites$fetchInviteIfNotLoaded$1) { public AnonymousClass3(StoreInstantInvites$fetchInviteIfNotLoaded$1 storeInstantInvites$fetchInviteIfNotLoaded$1) {
super(1); super(1);
this.this$0 = storeInstantInvites$fetchInviteIfNotLoaded$1; this.this$0 = storeInstantInvites$fetchInviteIfNotLoaded$1;
} }
@ -166,12 +195,13 @@ public final class StoreInstantInvites$fetchInviteIfNotLoaded$1 extends o implem
} }
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreInstantInvites$fetchInviteIfNotLoaded$1(StoreInstantInvites storeInstantInvites, String str, String str2, Long l, String str3) { public StoreInstantInvites$fetchInviteIfNotLoaded$1(StoreInstantInvites storeInstantInvites, String str, String str2, Long l, Boolean bool, String str3) {
super(0); super(0);
this.this$0 = storeInstantInvites; this.this$0 = storeInstantInvites;
this.$inviteKey = str; this.$inviteKey = str;
this.$inviteCode = str2; this.$inviteCode = str2;
this.$eventId = l; this.$eventId = l;
this.$inviteResolved = bool;
this.$location = str3; this.$location = str3;
} }
@ -184,7 +214,7 @@ public final class StoreInstantInvites$fetchInviteIfNotLoaded$1 extends o implem
String str = this.$inviteKey; String str = this.$inviteKey;
m.checkNotNullExpressionValue(str, "inviteKey"); m.checkNotNullExpressionValue(str, "inviteKey");
StoreInstantInvites.access$setChatInvites(storeInstantInvites, str, StoreInstantInvites.InviteState.Loading.INSTANCE); StoreInstantInvites.access$setChatInvites(storeInstantInvites, str, StoreInstantInvites.InviteState.Loading.INSTANCE);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(StoreInstantInvites.access$getRestAPI$p(this.this$0).getInviteCode(this.$inviteCode, true, this.$eventId), false, 1, null), this.this$0.getClass(), (Context) null, (Function1) null, new AnonymousClass2(this), (Function0) null, (Function0) null, new AnonymousClass1(this), 54, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(RestCallStateKt.logNetworkAction(StoreInstantInvites.access$getRestAPI$p(this.this$0).getInviteCode(this.$inviteCode, true, this.$eventId), new AnonymousClass1(this)), false, 1, null), this.this$0.getClass(), (Context) null, (Function1) null, new AnonymousClass3(this), (Function0) null, (Function0) null, new AnonymousClass2(this), 54, (Object) null);
} }
} }
} }

View file

@ -1,25 +0,0 @@
package com.discord.stores;
import com.discord.models.domain.ModelInvite;
import d0.z.d.o;
import java.util.Map;
import kotlin.jvm.functions.Function0;
/* compiled from: StoreInstantInvites.kt */
public final class StoreInstantInvites$observeInvites$1 extends o implements Function0<Map<String, ? extends ModelInvite>> {
public final /* synthetic */ long $guildId;
public final /* synthetic */ StoreInstantInvites this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreInstantInvites$observeInvites$1(StoreInstantInvites storeInstantInvites, long j) {
super(0);
this.this$0 = storeInstantInvites;
this.$guildId = j;
}
/* Return type fixed from 'java.util.Map<java.lang.String, com.discord.models.domain.ModelInvite>' to match base method */
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final Map<String, ? extends ModelInvite> mo1invoke() {
return this.this$0.getInvites(this.$guildId);
}
}

View file

@ -180,14 +180,17 @@ public final class StoreInstantInvites extends StoreV2 {
storeInstantInvites.setChatInvites(str, inviteState); storeInstantInvites.setChatInvites(str, inviteState);
} }
public static /* synthetic */ void fetchInviteIfNotLoaded$default(StoreInstantInvites storeInstantInvites, String str, Long l, String str2, int i, Object obj) { public static /* synthetic */ void fetchInviteIfNotLoaded$default(StoreInstantInvites storeInstantInvites, String str, Long l, String str2, Boolean bool, int i, Object obj) {
if ((i & 2) != 0) { if ((i & 2) != 0) {
l = null; l = null;
} }
if ((i & 4) != 0) { if ((i & 4) != 0) {
str2 = null; str2 = null;
} }
storeInstantInvites.fetchInviteIfNotLoaded(str, l, str2); if ((i & 8) != 0) {
bool = null;
}
storeInstantInvites.fetchInviteIfNotLoaded(str, l, str2, bool);
} }
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: java.util.Map<java.lang.Long, ? extends java.util.Map<java.lang.String, ? extends com.discord.models.domain.ModelInvite>>, java.util.Map<java.lang.Long, java.util.Map<java.lang.String, com.discord.models.domain.ModelInvite>> */ /* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: java.util.Map<java.lang.Long, ? extends java.util.Map<java.lang.String, ? extends com.discord.models.domain.ModelInvite>>, java.util.Map<java.lang.Long, java.util.Map<java.lang.String, com.discord.models.domain.ModelInvite>> */
@ -234,9 +237,9 @@ public final class StoreInstantInvites extends StoreV2 {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(this.restAPI.getGuildInvites(j), false, 1, null), StoreInstantInvites.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new StoreInstantInvites$fetchGuildInvites$1(this), 62, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(this.restAPI.getGuildInvites(j), false, 1, null), StoreInstantInvites.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new StoreInstantInvites$fetchGuildInvites$1(this), 62, (Object) null);
} }
public final void fetchInviteIfNotLoaded(String str, Long l, String str2) { public final void fetchInviteIfNotLoaded(String str, Long l, String str2, Boolean bool) {
m.checkNotNullParameter(str, "inviteCode"); m.checkNotNullParameter(str, "inviteCode");
this.dispatcher.schedule(new StoreInstantInvites$fetchInviteIfNotLoaded$1(this, ModelInvite.getInviteStoreKey(str, l), str, l, str2)); this.dispatcher.schedule(new StoreInstantInvites$fetchInviteIfNotLoaded$1(this, ModelInvite.getInviteStoreKey(str, l), str, l, bool, str2));
} }
public final Map<String, ModelInvite> getInvites(long j) { public final Map<String, ModelInvite> getInvites(long j) {
@ -255,12 +258,6 @@ public final class StoreInstantInvites extends StoreV2 {
return r; return r;
} }
public final Observable<Map<String, ModelInvite>> observeInvites(long j) {
Observable<Map<String, ModelInvite>> r = ObservationDeck.connectRx$default(this.observationDeck, new ObservationDeck.UpdateSource[]{this}, false, null, null, new StoreInstantInvites$observeInvites$1(this, j), 14, null).r();
m.checkNotNullExpressionValue(r, "observationDeck.connectR… }.distinctUntilChanged()");
return r;
}
public final Observable<Map<String, InviteState>> observeKnownInvites() { public final Observable<Map<String, InviteState>> observeKnownInvites() {
Observable<Map<String, InviteState>> r = ObservationDeck.connectRx$default(this.observationDeck, new ObservationDeck.UpdateSource[]{this}, false, null, null, new StoreInstantInvites$observeKnownInvites$1(this), 14, null).r(); Observable<Map<String, InviteState>> r = ObservationDeck.connectRx$default(this.observationDeck, new ObservationDeck.UpdateSource[]{this}, false, null, null, new StoreInstantInvites$observeKnownInvites$1(this), 14, null).r();
m.checkNotNullExpressionValue(r, "observationDeck.connectR… }.distinctUntilChanged()"); m.checkNotNullExpressionValue(r, "observationDeck.connectR… }.distinctUntilChanged()");

View file

@ -3,7 +3,6 @@ package com.discord.stores;
import a0.a.a.b; import a0.a.a.b;
import android.content.Context; import android.content.Context;
import android.util.Log; import android.util.Log;
import c.a.q.o0.e;
import c.a.q.w; import c.a.q.w;
import c.d.b.a.a; import c.d.b.a.a;
import co.discord.media_engine.VideoInputDeviceDescription; import co.discord.media_engine.VideoInputDeviceDescription;
@ -108,25 +107,23 @@ public final class StoreRtcConnection extends RtcConnection.b implements DebugPr
public void onConnecting() { public void onConnecting() {
} }
@Override // com.discord.stores.StoreRtcConnection.Listener, c.a.q.o0.e.f @Override // com.discord.stores.StoreRtcConnection.Listener
public void onFirstFrameReceived(long j) { public void onFirstFrameReceived(long j) {
} }
@Override // com.discord.stores.StoreRtcConnection.Listener, c.a.q.o0.e.f @Override // com.discord.stores.StoreRtcConnection.Listener
public void onFirstFrameSent() { public void onFirstFrameSent() {
} }
} }
/* compiled from: StoreRtcConnection.kt */ /* compiled from: StoreRtcConnection.kt */
public interface Listener extends e.f { public interface Listener {
void onConnected(); void onConnected();
void onConnecting(); void onConnecting();
@Override // c.a.q.o0.e.f
/* synthetic */ void onFirstFrameReceived(long j); /* synthetic */ void onFirstFrameReceived(long j);
@Override // c.a.q.o0.e.f
/* synthetic */ void onFirstFrameSent(); /* synthetic */ void onFirstFrameSent();
} }
@ -835,12 +832,12 @@ public final class StoreRtcConnection extends RtcConnection.b implements DebugPr
this.stream.getVoiceChannelSelected$app_productionCanaryRelease().clear(); this.stream.getVoiceChannelSelected$app_productionCanaryRelease().clear();
} }
@Override // com.discord.rtcconnection.RtcConnection.b, c.a.q.o0.e.f @Override // com.discord.rtcconnection.RtcConnection.b
public void onFirstFrameReceived(long j) { public void onFirstFrameReceived(long j) {
this.listenerSubject.notify(new StoreRtcConnection$onFirstFrameReceived$1(j)); this.listenerSubject.notify(new StoreRtcConnection$onFirstFrameReceived$1(j));
} }
@Override // com.discord.rtcconnection.RtcConnection.b, c.a.q.o0.e.f @Override // com.discord.rtcconnection.RtcConnection.b
public void onFirstFrameSent() { public void onFirstFrameSent() {
this.listenerSubject.notify(StoreRtcConnection$onFirstFrameSent$1.INSTANCE); this.listenerSubject.notify(StoreRtcConnection$onFirstFrameSent$1.INSTANCE);
} }

View file

@ -1,7 +1,6 @@
package com.discord.stores; package com.discord.stores;
import c.a.q.j; import c.a.q.j;
import c.a.q.o0.e;
import c.a.q.w; import c.a.q.w;
import c.d.b.a.a; import c.d.b.a.a;
import com.discord.app.App; import com.discord.app.App;
@ -78,25 +77,23 @@ public final class StoreStreamRtcConnection extends StoreV2 implements DebugPrin
public void onConnecting() { public void onConnecting() {
} }
@Override // com.discord.stores.StoreStreamRtcConnection.Listener, c.a.q.o0.e.f @Override // com.discord.stores.StoreStreamRtcConnection.Listener
public void onFirstFrameReceived(long j) { public void onFirstFrameReceived(long j) {
} }
@Override // com.discord.stores.StoreStreamRtcConnection.Listener, c.a.q.o0.e.f @Override // com.discord.stores.StoreStreamRtcConnection.Listener
public void onFirstFrameSent() { public void onFirstFrameSent() {
} }
} }
/* compiled from: StoreStreamRtcConnection.kt */ /* compiled from: StoreStreamRtcConnection.kt */
public interface Listener extends e.f { public interface Listener {
void onConnected(); void onConnected();
void onConnecting(); void onConnecting();
@Override // c.a.q.o0.e.f
/* synthetic */ void onFirstFrameReceived(long j); /* synthetic */ void onFirstFrameReceived(long j);
@Override // c.a.q.o0.e.f
/* synthetic */ void onFirstFrameSent(); /* synthetic */ void onFirstFrameSent();
} }
@ -130,12 +127,12 @@ public final class StoreStreamRtcConnection extends StoreV2 implements DebugPrin
} }
} }
@Override // com.discord.rtcconnection.RtcConnection.b, c.a.q.o0.e.f @Override // com.discord.rtcconnection.RtcConnection.b
public void onFirstFrameReceived(long j) { public void onFirstFrameReceived(long j) {
StoreStreamRtcConnection.access$getListenerSubject$p(StoreStreamRtcConnection.this).notify(new StoreStreamRtcConnection$RtcConnectionListener$onFirstFrameReceived$1(j)); StoreStreamRtcConnection.access$getListenerSubject$p(StoreStreamRtcConnection.this).notify(new StoreStreamRtcConnection$RtcConnectionListener$onFirstFrameReceived$1(j));
} }
@Override // com.discord.rtcconnection.RtcConnection.b, c.a.q.o0.e.f @Override // com.discord.rtcconnection.RtcConnection.b
public void onFirstFrameSent() { public void onFirstFrameSent() {
StoreStreamRtcConnection.access$getListenerSubject$p(StoreStreamRtcConnection.this).notify(StoreStreamRtcConnection$RtcConnectionListener$onFirstFrameSent$1.INSTANCE); StoreStreamRtcConnection.access$getListenerSubject$p(StoreStreamRtcConnection.this).notify(StoreStreamRtcConnection$RtcConnectionListener$onFirstFrameSent$1.INSTANCE);
} }

View file

@ -1,18 +0,0 @@
package com.discord.utilities.collections;
import kotlin.jvm.functions.Function1;
/* compiled from: ListenerCollection.kt */
public final class ListenerCollectionSubject$notifyAsync$1 implements Runnable {
public final /* synthetic */ Function1 $action;
public final /* synthetic */ ListenerCollectionSubject this$0;
public ListenerCollectionSubject$notifyAsync$1(ListenerCollectionSubject listenerCollectionSubject, Function1 function1) {
this.this$0 = listenerCollectionSubject;
this.$action = function1;
}
@Override // java.lang.Runnable
public final void run() {
this.this$0.notify(this.$action);
}
}

View file

@ -1,21 +0,0 @@
package com.discord.utilities.collections;
import com.discord.utilities.threading.PriorityThreadFactory;
import d0.z.d.o;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import kotlin.jvm.functions.Function0;
/* compiled from: ListenerCollection.kt */
public final class ListenerCollectionSubject$threadPool$2 extends o implements Function0<ExecutorService> {
public static final ListenerCollectionSubject$threadPool$2 INSTANCE = new ListenerCollectionSubject$threadPool$2();
public ListenerCollectionSubject$threadPool$2() {
super(0);
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final ExecutorService mo1invoke() {
return Executors.newCachedThreadPool(new PriorityThreadFactory(2));
}
}

View file

@ -1,30 +1,19 @@
package com.discord.utilities.collections; package com.discord.utilities.collections;
import android.util.Log; import android.util.Log;
import androidx.annotation.AnyThread;
import d0.g;
import d0.z.d.m; import d0.z.d.m;
import java.util.concurrent.CopyOnWriteArraySet; import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.ExecutorService;
import kotlin.Lazy;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: ListenerCollection.kt */ /* compiled from: ListenerCollection.kt */
public final class ListenerCollectionSubject<T> implements ListenerCollection<T> { public final class ListenerCollectionSubject<T> implements ListenerCollection<T> {
private final CopyOnWriteArraySet<T> listeners = new CopyOnWriteArraySet<>(); private final CopyOnWriteArraySet<T> listeners = new CopyOnWriteArraySet<>();
private final Lazy threadPool$delegate = g.lazy(ListenerCollectionSubject$threadPool$2.INSTANCE);
private final ExecutorService getThreadPool() {
return (ExecutorService) this.threadPool$delegate.getValue();
}
@Override // com.discord.utilities.collections.ListenerCollection @Override // com.discord.utilities.collections.ListenerCollection
@AnyThread
public void add(T t) { public void add(T t) {
this.listeners.add(t); this.listeners.add(t);
} }
@AnyThread
public final void clear() { public final void clear() {
this.listeners.clear(); this.listeners.clear();
} }
@ -40,13 +29,7 @@ public final class ListenerCollectionSubject<T> implements ListenerCollection<T>
} }
} }
public final void notifyAsync(Function1<? super T, Unit> function1) {
m.checkNotNullParameter(function1, "action");
getThreadPool().execute(new ListenerCollectionSubject$notifyAsync$1(this, function1));
}
@Override // com.discord.utilities.collections.ListenerCollection @Override // com.discord.utilities.collections.ListenerCollection
@AnyThread
public boolean remove(T t) { public boolean remove(T t) {
return this.listeners.remove(t); return this.listeners.remove(t);
} }

View file

@ -290,6 +290,7 @@ public final class NotificationData {
public static final /* synthetic */ int[] $EnumSwitchMapping$2; public static final /* synthetic */ int[] $EnumSwitchMapping$2;
public static final /* synthetic */ int[] $EnumSwitchMapping$3; public static final /* synthetic */ int[] $EnumSwitchMapping$3;
public static final /* synthetic */ int[] $EnumSwitchMapping$4; public static final /* synthetic */ int[] $EnumSwitchMapping$4;
public static final /* synthetic */ int[] $EnumSwitchMapping$5;
static { static {
GuildScheduledEventEntityType.values(); GuildScheduledEventEntityType.values();
@ -297,22 +298,40 @@ public final class NotificationData {
$EnumSwitchMapping$0 = iArr; $EnumSwitchMapping$0 = iArr;
GuildScheduledEventEntityType guildScheduledEventEntityType = GuildScheduledEventEntityType.STAGE_INSTANCE; GuildScheduledEventEntityType guildScheduledEventEntityType = GuildScheduledEventEntityType.STAGE_INSTANCE;
iArr[guildScheduledEventEntityType.ordinal()] = 1; iArr[guildScheduledEventEntityType.ordinal()] = 1;
GuildScheduledEventEntityType guildScheduledEventEntityType2 = GuildScheduledEventEntityType.VOICE;
iArr[guildScheduledEventEntityType2.ordinal()] = 2;
GuildScheduledEventEntityType guildScheduledEventEntityType3 = GuildScheduledEventEntityType.EXTERNAL;
iArr[guildScheduledEventEntityType3.ordinal()] = 3;
GuildScheduledEventEntityType.values(); GuildScheduledEventEntityType.values();
int[] iArr2 = new int[5]; int[] iArr2 = new int[5];
$EnumSwitchMapping$1 = iArr2; $EnumSwitchMapping$1 = iArr2;
iArr2[guildScheduledEventEntityType.ordinal()] = 1; iArr2[guildScheduledEventEntityType.ordinal()] = 1;
iArr2[guildScheduledEventEntityType2.ordinal()] = 2;
iArr2[guildScheduledEventEntityType3.ordinal()] = 3;
GuildScheduledEventEntityType.values(); GuildScheduledEventEntityType.values();
int[] iArr3 = new int[5]; int[] iArr3 = new int[5];
$EnumSwitchMapping$2 = iArr3; $EnumSwitchMapping$2 = iArr3;
iArr3[guildScheduledEventEntityType.ordinal()] = 1; iArr3[guildScheduledEventEntityType.ordinal()] = 1;
iArr3[guildScheduledEventEntityType2.ordinal()] = 2;
iArr3[guildScheduledEventEntityType3.ordinal()] = 3;
GuildScheduledEventEntityType.values(); GuildScheduledEventEntityType.values();
int[] iArr4 = new int[5]; int[] iArr4 = new int[5];
$EnumSwitchMapping$3 = iArr4; $EnumSwitchMapping$3 = iArr4;
iArr4[guildScheduledEventEntityType.ordinal()] = 1; iArr4[guildScheduledEventEntityType.ordinal()] = 1;
iArr4[guildScheduledEventEntityType2.ordinal()] = 2;
iArr4[guildScheduledEventEntityType3.ordinal()] = 3;
GuildScheduledEventEntityType.values(); GuildScheduledEventEntityType.values();
int[] iArr5 = new int[5]; int[] iArr5 = new int[5];
$EnumSwitchMapping$4 = iArr5; $EnumSwitchMapping$4 = iArr5;
iArr5[guildScheduledEventEntityType.ordinal()] = 1; iArr5[guildScheduledEventEntityType.ordinal()] = 1;
iArr5[guildScheduledEventEntityType2.ordinal()] = 2;
iArr5[guildScheduledEventEntityType3.ordinal()] = 3;
GuildScheduledEventEntityType.values();
int[] iArr6 = new int[5];
$EnumSwitchMapping$5 = iArr6;
iArr6[guildScheduledEventEntityType.ordinal()] = 1;
iArr6[guildScheduledEventEntityType2.ordinal()] = 2;
iArr6[guildScheduledEventEntityType3.ordinal()] = 3;
} }
} }
@ -435,20 +454,20 @@ public final class NotificationData {
return putExtra; return putExtra;
} }
/* JADX WARNING: Code restructure failed: missing block: B:11:0x0042, code lost: /* JADX WARNING: Code restructure failed: missing block: B:11:0x0043, code lost:
if (r0.equals(com.discord.utilities.fcm.NotificationData.TYPE_RELATIONSHIP_ADD) != false) goto L_0x0044; if (r0.equals(com.discord.utilities.fcm.NotificationData.TYPE_RELATIONSHIP_ADD) != false) goto L_0x0045;
*/ */
/* JADX WARNING: Code restructure failed: missing block: B:13:0x004a, code lost: /* JADX WARNING: Code restructure failed: missing block: B:13:0x004b, code lost:
if (r8.channel.A() == 1) goto L_0x005c; if (r8.channel.A() == 1) goto L_0x005d;
*/ */
/* JADX WARNING: Code restructure failed: missing block: B:28:?, code lost: /* JADX WARNING: Code restructure failed: missing block: B:33:?, code lost:
return com.discord.utilities.intent.IntentUtils.RouteBuilders.selectChannel$default(r8.channel.h(), r8.guildId, null, 4, null); return com.discord.utilities.intent.IntentUtils.RouteBuilders.selectChannel$default(r8.channel.h(), r8.guildId, null, 4, null);
*/ */
/* JADX WARNING: Code restructure failed: missing block: B:29:?, code lost: /* JADX WARNING: Code restructure failed: missing block: B:34:?, code lost:
return com.discord.utilities.intent.IntentUtils.RouteBuilders.selectChannel$default(r8.channel.h(), 0, null, 4, null); return com.discord.utilities.intent.IntentUtils.RouteBuilders.selectChannel$default(r8.channel.h(), 0, null, 4, null);
*/ */
/* JADX WARNING: Code restructure failed: missing block: B:3:0x0012, code lost: /* JADX WARNING: Code restructure failed: missing block: B:3:0x0012, code lost:
if (r0.equals(com.discord.utilities.fcm.NotificationData.TYPE_MESSAGE_CREATE) != false) goto L_0x0044; if (r0.equals(com.discord.utilities.fcm.NotificationData.TYPE_MESSAGE_CREATE) != false) goto L_0x0045;
*/ */
private final Intent getContentIntentInternal() { private final Intent getContentIntentInternal() {
String str = this.type; String str = this.type;
@ -456,7 +475,16 @@ public final class NotificationData {
case -1489275252: case -1489275252:
if (str.equals(TYPE_GUILD_SCHEDULED_EVENT_UPDATE)) { if (str.equals(TYPE_GUILD_SCHEDULED_EVENT_UPDATE)) {
GuildScheduledEventEntityType guildScheduledEventEntityType = this.guildScheduledEventEntityType; GuildScheduledEventEntityType guildScheduledEventEntityType = this.guildScheduledEventEntityType;
return (guildScheduledEventEntityType != null && guildScheduledEventEntityType.ordinal() == 1) ? IntentUtils.RouteBuilders.INSTANCE.connectVoice(this.channel.h()) : new Intent("android.intent.action.VIEW", IntentUtils.RouteBuilders.Uris.INSTANCE.getApp()); if (guildScheduledEventEntityType != null) {
int ordinal = guildScheduledEventEntityType.ordinal();
if (ordinal == 1 || ordinal == 2) {
return IntentUtils.RouteBuilders.INSTANCE.connectVoice(this.channel.h());
}
if (ordinal == 3) {
return IntentUtils.RouteBuilders.selectGuild(this.guildId);
}
}
return new Intent("android.intent.action.VIEW", IntentUtils.RouteBuilders.Uris.INSTANCE.getApp());
} }
return IntentUtils.RouteBuilders.selectChannel$default(this.channel.h(), this.guildId, null, 4, null); return IntentUtils.RouteBuilders.selectChannel$default(this.channel.h(), this.guildId, null, 4, null);
case -1327124998: case -1327124998:
@ -503,6 +531,7 @@ public final class NotificationData {
} }
public final boolean canDisplayInApp() { public final boolean canDisplayInApp() {
int ordinal;
if (m.areEqual(this.type, TYPE_STAGE_INSTANCE_CREATE)) { if (m.areEqual(this.type, TYPE_STAGE_INSTANCE_CREATE)) {
return true; return true;
} }
@ -510,7 +539,7 @@ public final class NotificationData {
return this.channel.h() == -1; return this.channel.h() == -1;
} }
GuildScheduledEventEntityType guildScheduledEventEntityType = this.guildScheduledEventEntityType; GuildScheduledEventEntityType guildScheduledEventEntityType = this.guildScheduledEventEntityType;
return guildScheduledEventEntityType != null && guildScheduledEventEntityType.ordinal() == 1; return guildScheduledEventEntityType != null && ((ordinal = guildScheduledEventEntityType.ordinal()) == 1 || ordinal == 2 || ordinal == 3);
} }
public final NotificationData copyForDirectReply(Message message) { public final NotificationData copyForDirectReply(Message message) {
@ -579,7 +608,11 @@ public final class NotificationData {
String str = this.type; String str = this.type;
switch (str.hashCode()) { switch (str.hashCode()) {
case -1489275252: case -1489275252:
return (!str.equals(TYPE_GUILD_SCHEDULED_EVENT_UPDATE) || (guildScheduledEventEntityType = this.guildScheduledEventEntityType) == null || guildScheduledEventEntityType.ordinal() != 1) ? "" : b.h(context, R.string.guild_scheduled_event_stage_start_body, new Object[]{this.stageInstanceTopic, this.userUsername}, null, 4); if (!str.equals(TYPE_GUILD_SCHEDULED_EVENT_UPDATE) || (guildScheduledEventEntityType = this.guildScheduledEventEntityType) == null) {
return "";
}
int ordinal = guildScheduledEventEntityType.ordinal();
return (ordinal == 1 || ordinal == 2) ? b.h(context, R.string.guild_scheduled_event_stage_start_body, new Object[]{this.stageInstanceTopic, this.userUsername}, null, 4) : ordinal != 3 ? "" : b.h(context, R.string.guild_scheduled_event_external_start_body, new Object[]{this.stageInstanceTopic}, null, 4);
case -1327124998: case -1327124998:
if (!str.equals(TYPE_RELATIONSHIP_ADD)) { if (!str.equals(TYPE_RELATIONSHIP_ADD)) {
return ""; return "";
@ -818,10 +851,17 @@ public final class NotificationData {
String str = this.type; String str = this.type;
switch (str.hashCode()) { switch (str.hashCode()) {
case -1489275252: case -1489275252:
if (!str.equals(TYPE_GUILD_SCHEDULED_EVENT_UPDATE) || (guildScheduledEventEntityType = this.guildScheduledEventEntityType) == null || guildScheduledEventEntityType.ordinal() != 1) { if (!str.equals(TYPE_GUILD_SCHEDULED_EVENT_UPDATE) || (guildScheduledEventEntityType = this.guildScheduledEventEntityType) == null) {
return ""; return "";
} }
return this.type + this.channel.h(); int ordinal = guildScheduledEventEntityType.ordinal();
if (ordinal == 1 || ordinal == 2) {
return this.type + this.channel.h();
} else if (ordinal != 3) {
return "";
} else {
return this.type + this.guildId;
}
case -1327124998: case -1327124998:
if (!str.equals(TYPE_RELATIONSHIP_ADD)) { if (!str.equals(TYPE_RELATIONSHIP_ADD)) {
return ""; return "";
@ -1088,7 +1128,11 @@ public final class NotificationData {
String str2 = this.type; String str2 = this.type;
switch (str2.hashCode()) { switch (str2.hashCode()) {
case -1489275252: case -1489275252:
return (!str2.equals(TYPE_GUILD_SCHEDULED_EVENT_UPDATE) || (guildScheduledEventEntityType = this.guildScheduledEventEntityType) == null || guildScheduledEventEntityType.ordinal() != 1) ? "" : b.h(context, R.string.guild_scheduled_event_stage_start_title, new Object[]{this.guildName}, null, 4); if (!str2.equals(TYPE_GUILD_SCHEDULED_EVENT_UPDATE) || (guildScheduledEventEntityType = this.guildScheduledEventEntityType) == null) {
return "";
}
int ordinal = guildScheduledEventEntityType.ordinal();
return (ordinal == 1 || ordinal == 2 || ordinal == 3) ? b.h(context, R.string.guild_scheduled_event_stage_start_title, new Object[]{this.guildName}, null, 4) : "";
case -1327124998: case -1327124998:
if (!str2.equals(TYPE_RELATIONSHIP_ADD) || (str = this.userUsername) == null) { if (!str2.equals(TYPE_RELATIONSHIP_ADD) || (str = this.userUsername) == null) {
return ""; return "";
@ -1143,10 +1187,15 @@ public final class NotificationData {
} }
public final boolean isValid() { public final boolean isValid() {
GuildScheduledEventEntityType guildScheduledEventEntityType;
String str = this.type; String str = this.type;
switch (str.hashCode()) { switch (str.hashCode()) {
case -1489275252: case -1489275252:
if (!str.equals(TYPE_GUILD_SCHEDULED_EVENT_UPDATE) || this.guildScheduledEventEntityType != GuildScheduledEventEntityType.STAGE_INSTANCE) { if (!str.equals(TYPE_GUILD_SCHEDULED_EVENT_UPDATE) || (guildScheduledEventEntityType = this.guildScheduledEventEntityType) == null) {
return false;
}
int ordinal = guildScheduledEventEntityType.ordinal();
if (ordinal != 1 && ordinal != 2 && ordinal != 3) {
return false; return false;
} }
break; break;

View file

@ -106,6 +106,11 @@ public final class IntentUtils {
return selectChannel(j, j2, l); return selectChannel(j, j2, l);
} }
public static final Intent selectGuild(long j) {
String valueOf = (j == 0 || j == -1) ? "@me" : Long.valueOf(j);
return new Intent("android.intent.action.VIEW", Uri.parse("discord://app/channels/" + valueOf));
}
public static final Intent selectUserProfile(long j) { public static final Intent selectUserProfile(long j) {
return new Intent("android.intent.action.VIEW", Uri.parse("discord://app/users/" + j)); return new Intent("android.intent.action.VIEW", Uri.parse("discord://app/users/" + j));
} }

View file

@ -717,14 +717,14 @@ public final class RestAPI implements RestAPIInterface {
@Override // com.discord.restapi.RestAPIInterface @Override // com.discord.restapi.RestAPIInterface
@o("guilds") @o("guilds")
public Observable<Guild> createGuild(@i0.f0.a RestAPIParams.CreateGuild createGuild) { public Observable<Response<Guild>> createGuild(@i0.f0.a RestAPIParams.CreateGuild createGuild) {
m.checkNotNullParameter(createGuild, "body"); m.checkNotNullParameter(createGuild, "body");
return this._api.createGuild(createGuild); return this._api.createGuild(createGuild);
} }
@Override // com.discord.restapi.RestAPIInterface @Override // com.discord.restapi.RestAPIInterface
@o("guilds/{guildId}/channels") @o("guilds/{guildId}/channels")
public Observable<Channel> createGuildChannel(@s("guildId") long j, @i0.f0.a RestAPIParams.CreateGuildChannel createGuildChannel) { public Observable<Response<Channel>> createGuildChannel(@s("guildId") long j, @i0.f0.a RestAPIParams.CreateGuildChannel createGuildChannel) {
m.checkNotNullParameter(createGuildChannel, "body"); m.checkNotNullParameter(createGuildChannel, "body");
return this._api.createGuildChannel(j, createGuildChannel); return this._api.createGuildChannel(j, createGuildChannel);
} }
@ -1020,7 +1020,7 @@ public final class RestAPI implements RestAPIInterface {
@Override // com.discord.restapi.RestAPIInterface @Override // com.discord.restapi.RestAPIInterface
@o("auth/forgot") @o("auth/forgot")
public Observable<Void> forgotPassword(@i0.f0.a RestAPIParams.ForgotPassword forgotPassword) { public Observable<Response<Void>> forgotPassword(@i0.f0.a RestAPIParams.ForgotPassword forgotPassword) {
m.checkNotNullParameter(forgotPassword, "body"); m.checkNotNullParameter(forgotPassword, "body");
return this._api.forgotPassword(forgotPassword); return this._api.forgotPassword(forgotPassword);
} }
@ -1342,7 +1342,7 @@ public final class RestAPI implements RestAPIInterface {
@Override // com.discord.restapi.RestAPIInterface @Override // com.discord.restapi.RestAPIInterface
@f("invites/{code}") @f("invites/{code}")
public Observable<ModelInvite> getInviteCode(@s("code") String str, @t("with_counts") boolean z2, @t("guild_scheduled_event_id") Long l) { public Observable<Response<ModelInvite>> getInviteCode(@s("code") String str, @t("with_counts") boolean z2, @t("guild_scheduled_event_id") Long l) {
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_CODE); m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_CODE);
return this._api.getInviteCode(str, z2, l); return this._api.getInviteCode(str, z2, l);
} }
@ -1629,7 +1629,7 @@ public final class RestAPI implements RestAPIInterface {
@Override // com.discord.restapi.RestAPIInterface @Override // com.discord.restapi.RestAPIInterface
@o("auth/logout") @o("auth/logout")
public Observable<Void> logout(@i0.f0.a RestAPIParams.UserDevices userDevices) { public Observable<Response<Void>> logout(@i0.f0.a RestAPIParams.UserDevices userDevices) {
m.checkNotNullParameter(userDevices, "body"); m.checkNotNullParameter(userDevices, "body");
return this._api.logout(userDevices); return this._api.logout(userDevices);
} }
@ -1671,7 +1671,7 @@ public final class RestAPI implements RestAPIInterface {
@Override // com.discord.restapi.RestAPIInterface @Override // com.discord.restapi.RestAPIInterface
@o("phone-verifications/verify") @o("phone-verifications/verify")
public Observable<ModelPhoneVerificationToken> phoneVerificationsVerify(@i0.f0.a RestAPIParams.VerificationCode verificationCode) { public Observable<Response<ModelPhoneVerificationToken>> phoneVerificationsVerify(@i0.f0.a RestAPIParams.VerificationCode verificationCode) {
m.checkNotNullParameter(verificationCode, "body"); m.checkNotNullParameter(verificationCode, "body");
return this._api.phoneVerificationsVerify(verificationCode); return this._api.phoneVerificationsVerify(verificationCode);
} }
@ -2295,7 +2295,7 @@ public final class RestAPI implements RestAPIInterface {
@Override // com.discord.restapi.RestAPIInterface @Override // com.discord.restapi.RestAPIInterface
@p("users/@me/connections/contacts/@me/external-friend-list-entries") @p("users/@me/connections/contacts/@me/external-friend-list-entries")
public Observable<BulkFriendSuggestions> uploadContacts(@i0.f0.a RestAPIParams.UploadContacts uploadContacts) { public Observable<Response<BulkFriendSuggestions>> uploadContacts(@i0.f0.a RestAPIParams.UploadContacts uploadContacts) {
m.checkNotNullParameter(uploadContacts, "uploadContacts"); m.checkNotNullParameter(uploadContacts, "uploadContacts");
return this._api.uploadContacts(uploadContacts); return this._api.uploadContacts(uploadContacts);
} }

View file

@ -544,7 +544,7 @@ public final class WidgetAuthLandingViewModel extends AppViewModel<ViewState> {
StoreInviteSettings.InviteCode inviteCode = storeState.getInviteCode(); StoreInviteSettings.InviteCode inviteCode = storeState.getInviteCode();
StoreState storeState2 = this.mostRecentStoreState; StoreState storeState2 = this.mostRecentStoreState;
if ((!m.areEqual(storeState2 != null ? storeState2.getInviteCode() : null, inviteCode)) && inviteCode != null) { if ((!m.areEqual(storeState2 != null ? storeState2.getInviteCode() : null, inviteCode)) && inviteCode != null) {
StoreInstantInvites.fetchInviteIfNotLoaded$default(this.storeInstantInvites, inviteCode.getInviteCode(), null, null, 6, null); StoreInstantInvites.fetchInviteIfNotLoaded$default(this.storeInstantInvites, inviteCode.getInviteCode(), null, null, null, 14, null);
} }
ModelInvite invite = storeState.getInvite(); ModelInvite invite = storeState.getInvite();
StoreGuildTemplates.GuildTemplateState guildTemplateState = storeState.getGuildTemplateState(); StoreGuildTemplates.GuildTemplateState guildTemplateState = storeState.getGuildTemplateState();

View file

@ -1,41 +1,19 @@
package com.discord.widgets.auth; package com.discord.widgets.auth;
import android.content.Intent; import com.discord.analytics.generated.events.network_action.TrackNetworkActionUserVerifyPhone;
import com.discord.app.AppActivity; import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.models.domain.ModelPhoneVerificationToken; import com.discord.models.domain.ModelPhoneVerificationToken;
import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetAuthPhoneVerify.kt */ /* compiled from: WidgetAuthPhoneVerify.kt */
public final class WidgetAuthPhoneVerify$evaluateCode$1 extends o implements Function1<ModelPhoneVerificationToken, Unit> { public final class WidgetAuthPhoneVerify$evaluateCode$1 extends o implements Function1<ModelPhoneVerificationToken, TrackNetworkMetadataReceiver> {
public final /* synthetic */ WidgetAuthPhoneVerify this$0; public static final WidgetAuthPhoneVerify$evaluateCode$1 INSTANCE = new WidgetAuthPhoneVerify$evaluateCode$1();
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ public WidgetAuthPhoneVerify$evaluateCode$1() {
public WidgetAuthPhoneVerify$evaluateCode$1(WidgetAuthPhoneVerify widgetAuthPhoneVerify) {
super(1); super(1);
this.this$0 = widgetAuthPhoneVerify;
} }
/* Return type fixed from 'java.lang.Object' to match base method */ public final TrackNetworkMetadataReceiver invoke(ModelPhoneVerificationToken modelPhoneVerificationToken) {
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ return new TrackNetworkActionUserVerifyPhone();
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(ModelPhoneVerificationToken modelPhoneVerificationToken) {
invoke(modelPhoneVerificationToken);
return Unit.a;
}
public final void invoke(ModelPhoneVerificationToken modelPhoneVerificationToken) {
m.checkNotNullParameter(modelPhoneVerificationToken, "it");
Intent intent = new Intent();
intent.putExtra("RESULT_EXTRA_TOKEN", modelPhoneVerificationToken.getToken());
AppActivity appActivity = this.this$0.getAppActivity();
if (appActivity != null) {
appActivity.setResult(-1, intent);
}
AppActivity appActivity2 = this.this$0.getAppActivity();
if (appActivity2 != null) {
appActivity2.finish();
}
} }
} }

View file

@ -1,14 +1,14 @@
package com.discord.widgets.auth; package com.discord.widgets.auth;
import com.discord.models.domain.ModelAuditLogEntry; import android.content.Intent;
import com.discord.utilities.auth.RegistrationFlowRepo; import com.discord.app.AppActivity;
import com.discord.utilities.error.Error; import com.discord.models.domain.ModelPhoneVerificationToken;
import d0.z.d.m; import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetAuthPhoneVerify.kt */ /* compiled from: WidgetAuthPhoneVerify.kt */
public final class WidgetAuthPhoneVerify$evaluateCode$2 extends o implements Function1<Error, Unit> { public final class WidgetAuthPhoneVerify$evaluateCode$2 extends o implements Function1<ModelPhoneVerificationToken, Unit> {
public final /* synthetic */ WidgetAuthPhoneVerify this$0; public final /* synthetic */ WidgetAuthPhoneVerify this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -20,14 +20,22 @@ public final class WidgetAuthPhoneVerify$evaluateCode$2 extends o implements Fun
/* Return type fixed from 'java.lang.Object' to match base method */ /* 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] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1 @Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Error error) { public /* bridge */ /* synthetic */ Unit invoke(ModelPhoneVerificationToken modelPhoneVerificationToken) {
invoke(error); invoke(modelPhoneVerificationToken);
return Unit.a; return Unit.a;
} }
public final void invoke(Error error) { public final void invoke(ModelPhoneVerificationToken modelPhoneVerificationToken) {
m.checkNotNullParameter(error, "it"); m.checkNotNullParameter(modelPhoneVerificationToken, "it");
RegistrationFlowRepo.Companion.getINSTANCE().trackTransition("Phone Verification", "response_error", d0.t.m.listOf(ModelAuditLogEntry.CHANGE_KEY_CODE)); Intent intent = new Intent();
WidgetAuthPhoneVerify.access$getBinding$p(this.this$0).f1712c.b(); intent.putExtra("RESULT_EXTRA_TOKEN", modelPhoneVerificationToken.getToken());
AppActivity appActivity = this.this$0.getAppActivity();
if (appActivity != null) {
appActivity.setResult(-1, intent);
}
AppActivity appActivity2 = this.this$0.getAppActivity();
if (appActivity2 != null) {
appActivity2.finish();
}
} }
} }

View file

@ -0,0 +1,33 @@
package com.discord.widgets.auth;
import com.discord.models.domain.ModelAuditLogEntry;
import com.discord.utilities.auth.RegistrationFlowRepo;
import com.discord.utilities.error.Error;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetAuthPhoneVerify.kt */
public final class WidgetAuthPhoneVerify$evaluateCode$3 extends o implements Function1<Error, Unit> {
public final /* synthetic */ WidgetAuthPhoneVerify this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetAuthPhoneVerify$evaluateCode$3(WidgetAuthPhoneVerify widgetAuthPhoneVerify) {
super(1);
this.this$0 = widgetAuthPhoneVerify;
}
/* 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(Error error) {
invoke(error);
return Unit.a;
}
public final void invoke(Error error) {
m.checkNotNullParameter(error, "it");
RegistrationFlowRepo.Companion.getINSTANCE().trackTransition("Phone Verification", "response_error", d0.t.m.listOf(ModelAuditLogEntry.CHANGE_KEY_CODE));
WidgetAuthPhoneVerify.access$getBinding$p(this.this$0).f1712c.b();
}
}

View file

@ -29,6 +29,7 @@ import com.discord.databinding.WidgetAuthPhoneVerifyBinding;
import com.discord.models.experiments.domain.Experiment; import com.discord.models.experiments.domain.Experiment;
import com.discord.restapi.RestAPIParams; import com.discord.restapi.RestAPIParams;
import com.discord.stores.StoreStream; import com.discord.stores.StoreStream;
import com.discord.stores.utilities.RestCallStateKt;
import com.discord.utilities.auth.RegistrationFlowRepo; import com.discord.utilities.auth.RegistrationFlowRepo;
import com.discord.utilities.rest.RestAPI; import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt; import com.discord.utilities.rx.ObservableExtensionsKt;
@ -211,7 +212,7 @@ public final class WidgetAuthPhoneVerify extends AppFragment {
if (str2 == null) { if (str2 == null) {
m.throwUninitializedPropertyAccessException("phone"); m.throwUninitializedPropertyAccessException("phone");
} }
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.withDimmer$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(api.phoneVerificationsVerify(new RestAPIParams.VerificationCode(str2, str)), false, 1, null), this, null, 2, null), getBinding().g, 0, 2, null), WidgetAuthPhoneVerify.class, getContext(), (Function1) null, new WidgetAuthPhoneVerify$evaluateCode$2(this), (Function0) null, (Function0) null, new WidgetAuthPhoneVerify$evaluateCode$1(this), 52, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.withDimmer$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestCallStateKt.logNetworkAction(api.phoneVerificationsVerify(new RestAPIParams.VerificationCode(str2, str)), WidgetAuthPhoneVerify$evaluateCode$1.INSTANCE), false, 1, null), this, null, 2, null), getBinding().g, 0, 2, null), WidgetAuthPhoneVerify.class, getContext(), (Function1) null, new WidgetAuthPhoneVerify$evaluateCode$3(this), (Function0) null, (Function0) null, new WidgetAuthPhoneVerify$evaluateCode$2(this), 52, (Object) null);
} }
private final WidgetAuthPhoneVerifyBinding getBinding() { private final WidgetAuthPhoneVerifyBinding getBinding() {

View file

@ -3,14 +3,20 @@ package com.discord.widgets.channels;
import android.content.Context; import android.content.Context;
import android.view.MenuItem; import android.view.MenuItem;
import com.discord.R; import com.discord.R;
import com.discord.analytics.generated.events.network_action.TrackNetworkActionChannelCreate;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.api.channel.Channel; import com.discord.api.channel.Channel;
import com.discord.api.permission.PermissionOverwrite;
import com.discord.restapi.RestAPIParams; import com.discord.restapi.RestAPIParams;
import com.discord.stores.utilities.RestCallStateKt;
import com.discord.utilities.rest.RestAPI; import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt; import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.utilities.view.extensions.ViewExtensions; import com.discord.utilities.view.extensions.ViewExtensions;
import com.google.android.material.textfield.TextInputLayout; import com.google.android.material.textfield.TextInputLayout;
import d0.z.d.k; import d0.z.d.k;
import d0.z.d.m; import d0.z.d.m;
import d0.z.d.o;
import java.util.List;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
@ -21,8 +27,25 @@ public final class WidgetCreateChannel$configureUI$1<T1, T2> implements Action2<
/* compiled from: WidgetCreateChannel.kt */ /* compiled from: WidgetCreateChannel.kt */
/* renamed from: com.discord.widgets.channels.WidgetCreateChannel$configureUI$1$1 reason: invalid class name */ /* renamed from: com.discord.widgets.channels.WidgetCreateChannel$configureUI$1$1 reason: invalid class name */
public static final /* synthetic */ class AnonymousClass1 extends k implements Function1<Channel, Unit> { public static final class AnonymousClass1 extends o implements Function1<Channel, TrackNetworkMetadataReceiver> {
public AnonymousClass1(WidgetCreateChannel widgetCreateChannel) { public final /* synthetic */ WidgetCreateChannel$configureUI$1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(WidgetCreateChannel$configureUI$1 widgetCreateChannel$configureUI$1) {
super(1);
this.this$0 = widgetCreateChannel$configureUI$1;
}
public final TrackNetworkMetadataReceiver invoke(Channel channel) {
List<PermissionOverwrite> s2;
return new TrackNetworkActionChannelCreate((channel == null || (s2 = channel.s()) == null) ? null : Boolean.valueOf(!s2.isEmpty()), channel != null ? Long.valueOf((long) channel.A()) : null, channel != null ? Long.valueOf(channel.h()) : null, channel != null ? Long.valueOf(channel.r()) : null, Long.valueOf(WidgetCreateChannel.access$getGuildId$p(this.this$0.this$0)));
}
}
/* compiled from: WidgetCreateChannel.kt */
/* renamed from: com.discord.widgets.channels.WidgetCreateChannel$configureUI$1$2 reason: invalid class name */
public static final /* synthetic */ class AnonymousClass2 extends k implements Function1<Channel, Unit> {
public AnonymousClass2(WidgetCreateChannel widgetCreateChannel) {
super(1, widgetCreateChannel, WidgetCreateChannel.class, "onChannelCreated", "onChannelCreated(Lcom/discord/api/channel/Channel;)V", 0); super(1, widgetCreateChannel, WidgetCreateChannel.class, "onChannelCreated", "onChannelCreated(Lcom/discord/api/channel/Channel;)V", 0);
} }
@ -52,7 +75,7 @@ public final class WidgetCreateChannel$configureUI$1<T1, T2> implements Action2<
int access$getChannelType$p = WidgetCreateChannel.access$getChannelType$p(this.this$0); int access$getChannelType$p = WidgetCreateChannel.access$getChannelType$p(this.this$0);
TextInputLayout textInputLayout = WidgetCreateChannel.access$getBinding$p(this.this$0).d; TextInputLayout textInputLayout = WidgetCreateChannel.access$getBinding$p(this.this$0).d;
m.checkNotNullExpressionValue(textInputLayout, "binding.createChannelNameLayout"); m.checkNotNullExpressionValue(textInputLayout, "binding.createChannelNameLayout");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(api.createGuildChannel(access$getGuildId$p, new RestAPIParams.CreateGuildChannel(access$getChannelType$p, null, ViewExtensions.getTextOrEmpty(textInputLayout), WidgetCreateChannel.access$getCategoryId$p(this.this$0), WidgetCreateChannel.access$getPermissionOverwrites(this.this$0), null)), false, 1, null), this.this$0, null, 2, null), this.this$0.getClass(), this.this$0.getContext(), (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass1(this.this$0), 60, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestCallStateKt.logNetworkAction(api.createGuildChannel(access$getGuildId$p, new RestAPIParams.CreateGuildChannel(access$getChannelType$p, null, ViewExtensions.getTextOrEmpty(textInputLayout), WidgetCreateChannel.access$getCategoryId$p(this.this$0), WidgetCreateChannel.access$getPermissionOverwrites(this.this$0), null)), new AnonymousClass1(this)), false, 1, null), this.this$0, null, 2, null), this.this$0.getClass(), this.this$0.getContext(), (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass2(this.this$0), 60, (Object) null);
} }
} }
} }

View file

@ -20,8 +20,8 @@ import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function3; import kotlin.jvm.functions.Function3;
/* compiled from: WidgetChannelListModel.kt */ /* compiled from: WidgetChannelListModel.kt */
public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1 extends o implements Function3<Channel, Boolean, Boolean, WidgetChannelListModel.Companion.TextLikeChannelData> { public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1 extends o implements Function3<Channel, Boolean, Boolean, WidgetChannelListModel.Companion.TextLikeChannelData> {
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$3 $areAllChildThreadsRead$3$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$4 $areAllChildThreadsRead$4$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$4 $areAnyChildThreadsSelected$4$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$5 $areAnyChildThreadsSelected$5$inlined;
public final /* synthetic */ Set $channelsWithActiveThreads$inlined; public final /* synthetic */ Set $channelsWithActiveThreads$inlined;
public final /* synthetic */ Set $collapsedCategories$inlined; public final /* synthetic */ Set $collapsedCategories$inlined;
public final /* synthetic */ HashSet $forceViewCategories$inlined; public final /* synthetic */ HashSet $forceViewCategories$inlined;
@ -29,7 +29,7 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
public final /* synthetic */ List $guildScheduledEvents$inlined; public final /* synthetic */ List $guildScheduledEvents$inlined;
public final /* synthetic */ HashSet $hiddenChannelsIds$inlined; public final /* synthetic */ HashSet $hiddenChannelsIds$inlined;
public final /* synthetic */ boolean $isCategoryMuted; public final /* synthetic */ boolean $isCategoryMuted;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$2 $isThreadUnread$2$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$3 $isThreadUnread$3$inlined;
public final /* synthetic */ ArrayList $items$inlined; public final /* synthetic */ ArrayList $items$inlined;
public final /* synthetic */ Map $mentionCounts$inlined; public final /* synthetic */ Map $mentionCounts$inlined;
public final /* synthetic */ Channel $selectedChannel$inlined; public final /* synthetic */ Channel $selectedChannel$inlined;
@ -38,7 +38,7 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
public final /* synthetic */ Map $stageChannels$inlined; public final /* synthetic */ Map $stageChannels$inlined;
public final /* synthetic */ Map $stageInstances$inlined; public final /* synthetic */ Map $stageInstances$inlined;
public final /* synthetic */ Map $threadParentMap$inlined; public final /* synthetic */ Map $threadParentMap$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$1 $tryRemoveEmptyCategory$1$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$2 $tryRemoveEmptyCategory$2$inlined;
public final /* synthetic */ Set $unreadChannelIds$inlined; public final /* synthetic */ Set $unreadChannelIds$inlined;
public final /* synthetic */ Map $voiceStates$inlined; public final /* synthetic */ Map $voiceStates$inlined;
@ -67,9 +67,9 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
} }
long h = channel.h(); long h = channel.h();
Channel channel2 = this.this$0.$selectedChannel$inlined; Channel channel2 = this.this$0.$selectedChannel$inlined;
boolean z2 = (channel2 != null && (h > channel2.h() ? 1 : (h == channel2.h() ? 0 : -1)) == 0) || this.this$0.$areAnyChildThreadsSelected$4$inlined.invoke(channel.h()); boolean z2 = (channel2 != null && (h > channel2.h() ? 1 : (h == channel2.h() ? 0 : -1)) == 0) || this.this$0.$areAnyChildThreadsSelected$5$inlined.invoke(channel.h());
boolean contains = this.this$0.$collapsedCategories$inlined.contains(Long.valueOf(channel.r())); boolean contains = this.this$0.$collapsedCategories$inlined.contains(Long.valueOf(channel.r()));
return (this.this$0.$hiddenChannelsIds$inlined.contains(Long.valueOf(this.$textChannel.r())) || (!z2 && !this.this$0.$isThreadUnread$2$inlined.invoke(this.$textChannel) && (contains || m.areEqual(this.$isParentMuted, Boolean.TRUE)))) ? 1 : null; return (this.this$0.$hiddenChannelsIds$inlined.contains(Long.valueOf(this.$textChannel.r())) || (!z2 && !this.this$0.$isThreadUnread$3$inlined.invoke(this.$textChannel) && (contains || m.areEqual(this.$isParentMuted, Boolean.TRUE)))) ? 1 : null;
} }
} }
@ -106,8 +106,8 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
Boolean bool = 1; Boolean bool = 1;
boolean z2 = this.$mentionCount <= 0; boolean z2 = this.$mentionCount <= 0;
boolean contains = this.this$0.$collapsedCategories$inlined.contains(Long.valueOf(this.$textChannel.r())); boolean contains = this.this$0.$collapsedCategories$inlined.contains(Long.valueOf(this.$textChannel.r()));
boolean z3 = this.$channelSelected || this.this$0.$areAnyChildThreadsSelected$4$inlined.invoke(this.$textChannel.h()); boolean z3 = this.$channelSelected || this.this$0.$areAnyChildThreadsSelected$5$inlined.invoke(this.$textChannel.h());
boolean invoke = this.this$0.$areAllChildThreadsRead$3$inlined.invoke(this.$textChannel.h()); boolean invoke = this.this$0.$areAllChildThreadsRead$4$inlined.invoke(this.$textChannel.h());
boolean z4 = (contains && z2 && (this.this$0.$isCategoryMuted || this.$isMuted || !this.$unread)) || (this.$isMuted && this.this$0.$guild$inlined.getHideMutedChannels()); boolean z4 = (contains && z2 && (this.this$0.$isCategoryMuted || this.$isMuted || !this.$unread)) || (this.$isMuted && this.this$0.$guild$inlined.getHideMutedChannels());
if (z3 || !invoke || !z4) { if (z3 || !invoke || !z4) {
bool = 0; bool = 0;
@ -120,7 +120,7 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
} }
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1(boolean z2, GuildChannelsInfo guildChannelsInfo, HashSet hashSet, Channel channel, Map map, Set set, long j, WidgetChannelListModel$Companion$guildListBuilder$4 widgetChannelListModel$Companion$guildListBuilder$4, Set set2, WidgetChannelListModel$Companion$guildListBuilder$2 widgetChannelListModel$Companion$guildListBuilder$2, HashSet hashSet2, WidgetChannelListModel$Companion$guildListBuilder$3 widgetChannelListModel$Companion$guildListBuilder$3, long j2, Map map2, Set set3, List list, Map map3, Map map4, Map map5, ArrayList arrayList, WidgetChannelListModel$Companion$guildListBuilder$1 widgetChannelListModel$Companion$guildListBuilder$1) { public WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1(boolean z2, GuildChannelsInfo guildChannelsInfo, HashSet hashSet, Channel channel, Map map, Set set, long j, WidgetChannelListModel$Companion$guildListBuilder$5 widgetChannelListModel$Companion$guildListBuilder$5, Set set2, WidgetChannelListModel$Companion$guildListBuilder$3 widgetChannelListModel$Companion$guildListBuilder$3, HashSet hashSet2, WidgetChannelListModel$Companion$guildListBuilder$4 widgetChannelListModel$Companion$guildListBuilder$4, long j2, Map map2, Set set3, List list, Map map3, Map map4, Map map5, ArrayList arrayList, WidgetChannelListModel$Companion$guildListBuilder$2 widgetChannelListModel$Companion$guildListBuilder$2) {
super(3); super(3);
this.$isCategoryMuted = z2; this.$isCategoryMuted = z2;
this.$guild$inlined = guildChannelsInfo; this.$guild$inlined = guildChannelsInfo;
@ -129,11 +129,11 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
this.$mentionCounts$inlined = map; this.$mentionCounts$inlined = map;
this.$unreadChannelIds$inlined = set; this.$unreadChannelIds$inlined = set;
this.$selectedGuildId$inlined = j; this.$selectedGuildId$inlined = j;
this.$areAnyChildThreadsSelected$4$inlined = widgetChannelListModel$Companion$guildListBuilder$4; this.$areAnyChildThreadsSelected$5$inlined = widgetChannelListModel$Companion$guildListBuilder$5;
this.$collapsedCategories$inlined = set2; this.$collapsedCategories$inlined = set2;
this.$isThreadUnread$2$inlined = widgetChannelListModel$Companion$guildListBuilder$2; this.$isThreadUnread$3$inlined = widgetChannelListModel$Companion$guildListBuilder$3;
this.$hiddenChannelsIds$inlined = hashSet2; this.$hiddenChannelsIds$inlined = hashSet2;
this.$areAllChildThreadsRead$3$inlined = widgetChannelListModel$Companion$guildListBuilder$3; this.$areAllChildThreadsRead$4$inlined = widgetChannelListModel$Companion$guildListBuilder$4;
this.$selectedVoiceChannelId$inlined = j2; this.$selectedVoiceChannelId$inlined = j2;
this.$voiceStates$inlined = map2; this.$voiceStates$inlined = map2;
this.$channelsWithActiveThreads$inlined = set3; this.$channelsWithActiveThreads$inlined = set3;
@ -142,7 +142,7 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
this.$stageChannels$inlined = map4; this.$stageChannels$inlined = map4;
this.$threadParentMap$inlined = map5; this.$threadParentMap$inlined = map5;
this.$items$inlined = arrayList; this.$items$inlined = arrayList;
this.$tryRemoveEmptyCategory$1$inlined = widgetChannelListModel$Companion$guildListBuilder$1; this.$tryRemoveEmptyCategory$2$inlined = widgetChannelListModel$Companion$guildListBuilder$2;
} }
public static /* synthetic */ WidgetChannelListModel.Companion.TextLikeChannelData invoke$default(WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1 widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1, Channel channel, boolean z2, Boolean bool, int i, Object obj) { public static /* synthetic */ WidgetChannelListModel.Companion.TextLikeChannelData invoke$default(WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1 widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1, Channel channel, boolean z2, Boolean bool, int i, Object obj) {

View file

@ -20,8 +20,8 @@ import java.util.Set;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetChannelListModel.kt */ /* compiled from: WidgetChannelListModel.kt */
public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$2 extends o implements Function1<Channel, WidgetChannelListModel.Companion.VocalChannelData> { public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$2 extends o implements Function1<Channel, WidgetChannelListModel.Companion.VocalChannelData> {
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$3 $areAllChildThreadsRead$3$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$4 $areAllChildThreadsRead$4$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$4 $areAnyChildThreadsSelected$4$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$5 $areAnyChildThreadsSelected$5$inlined;
public final /* synthetic */ Channel $channel; public final /* synthetic */ Channel $channel;
public final /* synthetic */ long $channelId; public final /* synthetic */ long $channelId;
public final /* synthetic */ Set $channelsWithActiveThreads$inlined; public final /* synthetic */ Set $channelsWithActiveThreads$inlined;
@ -30,7 +30,7 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
public final /* synthetic */ GuildChannelsInfo $guild$inlined; public final /* synthetic */ GuildChannelsInfo $guild$inlined;
public final /* synthetic */ List $guildScheduledEvents$inlined; public final /* synthetic */ List $guildScheduledEvents$inlined;
public final /* synthetic */ HashSet $hiddenChannelsIds$inlined; public final /* synthetic */ HashSet $hiddenChannelsIds$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$2 $isThreadUnread$2$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$3 $isThreadUnread$3$inlined;
public final /* synthetic */ ArrayList $items$inlined; public final /* synthetic */ ArrayList $items$inlined;
public final /* synthetic */ Map $mentionCounts$inlined; public final /* synthetic */ Map $mentionCounts$inlined;
public final /* synthetic */ Long $permissions; public final /* synthetic */ Long $permissions;
@ -40,12 +40,12 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
public final /* synthetic */ Map $stageChannels$inlined; public final /* synthetic */ Map $stageChannels$inlined;
public final /* synthetic */ Map $stageInstances$inlined; public final /* synthetic */ Map $stageInstances$inlined;
public final /* synthetic */ Map $threadParentMap$inlined; public final /* synthetic */ Map $threadParentMap$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$1 $tryRemoveEmptyCategory$1$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$2 $tryRemoveEmptyCategory$2$inlined;
public final /* synthetic */ Set $unreadChannelIds$inlined; public final /* synthetic */ Set $unreadChannelIds$inlined;
public final /* synthetic */ Map $voiceStates$inlined; public final /* synthetic */ Map $voiceStates$inlined;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$2(long j, Channel channel, Long l, GuildChannelsInfo guildChannelsInfo, HashSet hashSet, Channel channel2, Map map, Set set, long j2, WidgetChannelListModel$Companion$guildListBuilder$4 widgetChannelListModel$Companion$guildListBuilder$4, Set set2, WidgetChannelListModel$Companion$guildListBuilder$2 widgetChannelListModel$Companion$guildListBuilder$2, HashSet hashSet2, WidgetChannelListModel$Companion$guildListBuilder$3 widgetChannelListModel$Companion$guildListBuilder$3, long j3, Map map2, Set set3, List list, Map map3, Map map4, Map map5, ArrayList arrayList, WidgetChannelListModel$Companion$guildListBuilder$1 widgetChannelListModel$Companion$guildListBuilder$1) { public WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$2(long j, Channel channel, Long l, GuildChannelsInfo guildChannelsInfo, HashSet hashSet, Channel channel2, Map map, Set set, long j2, WidgetChannelListModel$Companion$guildListBuilder$5 widgetChannelListModel$Companion$guildListBuilder$5, Set set2, WidgetChannelListModel$Companion$guildListBuilder$3 widgetChannelListModel$Companion$guildListBuilder$3, HashSet hashSet2, WidgetChannelListModel$Companion$guildListBuilder$4 widgetChannelListModel$Companion$guildListBuilder$4, long j3, Map map2, Set set3, List list, Map map3, Map map4, Map map5, ArrayList arrayList, WidgetChannelListModel$Companion$guildListBuilder$2 widgetChannelListModel$Companion$guildListBuilder$2) {
super(1); super(1);
this.$channelId = j; this.$channelId = j;
this.$channel = channel; this.$channel = channel;
@ -56,11 +56,11 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
this.$mentionCounts$inlined = map; this.$mentionCounts$inlined = map;
this.$unreadChannelIds$inlined = set; this.$unreadChannelIds$inlined = set;
this.$selectedGuildId$inlined = j2; this.$selectedGuildId$inlined = j2;
this.$areAnyChildThreadsSelected$4$inlined = widgetChannelListModel$Companion$guildListBuilder$4; this.$areAnyChildThreadsSelected$5$inlined = widgetChannelListModel$Companion$guildListBuilder$5;
this.$collapsedCategories$inlined = set2; this.$collapsedCategories$inlined = set2;
this.$isThreadUnread$2$inlined = widgetChannelListModel$Companion$guildListBuilder$2; this.$isThreadUnread$3$inlined = widgetChannelListModel$Companion$guildListBuilder$3;
this.$hiddenChannelsIds$inlined = hashSet2; this.$hiddenChannelsIds$inlined = hashSet2;
this.$areAllChildThreadsRead$3$inlined = widgetChannelListModel$Companion$guildListBuilder$3; this.$areAllChildThreadsRead$4$inlined = widgetChannelListModel$Companion$guildListBuilder$4;
this.$selectedVoiceChannelId$inlined = j3; this.$selectedVoiceChannelId$inlined = j3;
this.$voiceStates$inlined = map2; this.$voiceStates$inlined = map2;
this.$channelsWithActiveThreads$inlined = set3; this.$channelsWithActiveThreads$inlined = set3;
@ -69,7 +69,7 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
this.$stageChannels$inlined = map4; this.$stageChannels$inlined = map4;
this.$threadParentMap$inlined = map5; this.$threadParentMap$inlined = map5;
this.$items$inlined = arrayList; this.$items$inlined = arrayList;
this.$tryRemoveEmptyCategory$1$inlined = widgetChannelListModel$Companion$guildListBuilder$1; this.$tryRemoveEmptyCategory$2$inlined = widgetChannelListModel$Companion$guildListBuilder$2;
} }
public final WidgetChannelListModel.Companion.VocalChannelData invoke(Channel channel) { public final WidgetChannelListModel.Companion.VocalChannelData invoke(Channel channel) {

View file

@ -14,8 +14,8 @@ import java.util.Set;
import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function0;
/* compiled from: WidgetChannelListModel.kt */ /* compiled from: WidgetChannelListModel.kt */
public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$3 extends o implements Function0<ChannelListItemTextChannel> { public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$3 extends o implements Function0<ChannelListItemTextChannel> {
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$3 $areAllChildThreadsRead$3$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$4 $areAllChildThreadsRead$4$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$4 $areAnyChildThreadsSelected$4$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$5 $areAnyChildThreadsSelected$5$inlined;
public final /* synthetic */ Channel $channel; public final /* synthetic */ Channel $channel;
public final /* synthetic */ Set $channelsWithActiveThreads$inlined; public final /* synthetic */ Set $channelsWithActiveThreads$inlined;
public final /* synthetic */ Set $collapsedCategories$inlined; public final /* synthetic */ Set $collapsedCategories$inlined;
@ -24,7 +24,7 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
public final /* synthetic */ GuildChannelsInfo $guild$inlined; public final /* synthetic */ GuildChannelsInfo $guild$inlined;
public final /* synthetic */ List $guildScheduledEvents$inlined; public final /* synthetic */ List $guildScheduledEvents$inlined;
public final /* synthetic */ HashSet $hiddenChannelsIds$inlined; public final /* synthetic */ HashSet $hiddenChannelsIds$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$2 $isThreadUnread$2$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$3 $isThreadUnread$3$inlined;
public final /* synthetic */ ArrayList $items$inlined; public final /* synthetic */ ArrayList $items$inlined;
public final /* synthetic */ Map $mentionCounts$inlined; public final /* synthetic */ Map $mentionCounts$inlined;
public final /* synthetic */ boolean $muted; public final /* synthetic */ boolean $muted;
@ -35,12 +35,12 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
public final /* synthetic */ Map $stageChannels$inlined; public final /* synthetic */ Map $stageChannels$inlined;
public final /* synthetic */ Map $stageInstances$inlined; public final /* synthetic */ Map $stageInstances$inlined;
public final /* synthetic */ Map $threadParentMap$inlined; public final /* synthetic */ Map $threadParentMap$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$1 $tryRemoveEmptyCategory$1$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$2 $tryRemoveEmptyCategory$2$inlined;
public final /* synthetic */ Set $unreadChannelIds$inlined; public final /* synthetic */ Set $unreadChannelIds$inlined;
public final /* synthetic */ Map $voiceStates$inlined; public final /* synthetic */ Map $voiceStates$inlined;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$3(Channel channel, Long l, WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1 widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1, boolean z2, GuildChannelsInfo guildChannelsInfo, HashSet hashSet, Channel channel2, Map map, Set set, long j, WidgetChannelListModel$Companion$guildListBuilder$4 widgetChannelListModel$Companion$guildListBuilder$4, Set set2, WidgetChannelListModel$Companion$guildListBuilder$2 widgetChannelListModel$Companion$guildListBuilder$2, HashSet hashSet2, WidgetChannelListModel$Companion$guildListBuilder$3 widgetChannelListModel$Companion$guildListBuilder$3, long j2, Map map2, Set set3, List list, Map map3, Map map4, Map map5, ArrayList arrayList, WidgetChannelListModel$Companion$guildListBuilder$1 widgetChannelListModel$Companion$guildListBuilder$1) { public WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$3(Channel channel, Long l, WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1 widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1, boolean z2, GuildChannelsInfo guildChannelsInfo, HashSet hashSet, Channel channel2, Map map, Set set, long j, WidgetChannelListModel$Companion$guildListBuilder$5 widgetChannelListModel$Companion$guildListBuilder$5, Set set2, WidgetChannelListModel$Companion$guildListBuilder$3 widgetChannelListModel$Companion$guildListBuilder$3, HashSet hashSet2, WidgetChannelListModel$Companion$guildListBuilder$4 widgetChannelListModel$Companion$guildListBuilder$4, long j2, Map map2, Set set3, List list, Map map3, Map map4, Map map5, ArrayList arrayList, WidgetChannelListModel$Companion$guildListBuilder$2 widgetChannelListModel$Companion$guildListBuilder$2) {
super(0); super(0);
this.$channel = channel; this.$channel = channel;
this.$permissions = l; this.$permissions = l;
@ -52,11 +52,11 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
this.$mentionCounts$inlined = map; this.$mentionCounts$inlined = map;
this.$unreadChannelIds$inlined = set; this.$unreadChannelIds$inlined = set;
this.$selectedGuildId$inlined = j; this.$selectedGuildId$inlined = j;
this.$areAnyChildThreadsSelected$4$inlined = widgetChannelListModel$Companion$guildListBuilder$4; this.$areAnyChildThreadsSelected$5$inlined = widgetChannelListModel$Companion$guildListBuilder$5;
this.$collapsedCategories$inlined = set2; this.$collapsedCategories$inlined = set2;
this.$isThreadUnread$2$inlined = widgetChannelListModel$Companion$guildListBuilder$2; this.$isThreadUnread$3$inlined = widgetChannelListModel$Companion$guildListBuilder$3;
this.$hiddenChannelsIds$inlined = hashSet2; this.$hiddenChannelsIds$inlined = hashSet2;
this.$areAllChildThreadsRead$3$inlined = widgetChannelListModel$Companion$guildListBuilder$3; this.$areAllChildThreadsRead$4$inlined = widgetChannelListModel$Companion$guildListBuilder$4;
this.$selectedVoiceChannelId$inlined = j2; this.$selectedVoiceChannelId$inlined = j2;
this.$voiceStates$inlined = map2; this.$voiceStates$inlined = map2;
this.$channelsWithActiveThreads$inlined = set3; this.$channelsWithActiveThreads$inlined = set3;
@ -65,7 +65,7 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
this.$stageChannels$inlined = map4; this.$stageChannels$inlined = map4;
this.$threadParentMap$inlined = map5; this.$threadParentMap$inlined = map5;
this.$items$inlined = arrayList; this.$items$inlined = arrayList;
this.$tryRemoveEmptyCategory$1$inlined = widgetChannelListModel$Companion$guildListBuilder$1; this.$tryRemoveEmptyCategory$2$inlined = widgetChannelListModel$Companion$guildListBuilder$2;
} }
@Override // kotlin.jvm.functions.Function0 @Override // kotlin.jvm.functions.Function0

View file

@ -16,8 +16,8 @@ import java.util.Set;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetChannelListModel.kt */ /* compiled from: WidgetChannelListModel.kt */
public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$4 extends o implements Function1<Channel, ChannelListItemThread> { public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$4 extends o implements Function1<Channel, ChannelListItemThread> {
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$3 $areAllChildThreadsRead$3$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$4 $areAllChildThreadsRead$4$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$4 $areAnyChildThreadsSelected$4$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$5 $areAnyChildThreadsSelected$5$inlined;
public final /* synthetic */ Set $channelsWithActiveThreads$inlined; public final /* synthetic */ Set $channelsWithActiveThreads$inlined;
public final /* synthetic */ Set $collapsedCategories$inlined; public final /* synthetic */ Set $collapsedCategories$inlined;
public final /* synthetic */ HashSet $forceViewCategories$inlined; public final /* synthetic */ HashSet $forceViewCategories$inlined;
@ -25,7 +25,7 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
public final /* synthetic */ GuildChannelsInfo $guild$inlined; public final /* synthetic */ GuildChannelsInfo $guild$inlined;
public final /* synthetic */ List $guildScheduledEvents$inlined; public final /* synthetic */ List $guildScheduledEvents$inlined;
public final /* synthetic */ HashSet $hiddenChannelsIds$inlined; public final /* synthetic */ HashSet $hiddenChannelsIds$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$2 $isThreadUnread$2$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$3 $isThreadUnread$3$inlined;
public final /* synthetic */ ArrayList $items$inlined; public final /* synthetic */ ArrayList $items$inlined;
public final /* synthetic */ Map $mentionCounts$inlined; public final /* synthetic */ Map $mentionCounts$inlined;
public final /* synthetic */ Channel $selectedChannel$inlined; public final /* synthetic */ Channel $selectedChannel$inlined;
@ -34,12 +34,12 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
public final /* synthetic */ Map $stageChannels$inlined; public final /* synthetic */ Map $stageChannels$inlined;
public final /* synthetic */ Map $stageInstances$inlined; public final /* synthetic */ Map $stageInstances$inlined;
public final /* synthetic */ Map $threadParentMap$inlined; public final /* synthetic */ Map $threadParentMap$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$1 $tryRemoveEmptyCategory$1$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$2 $tryRemoveEmptyCategory$2$inlined;
public final /* synthetic */ Set $unreadChannelIds$inlined; public final /* synthetic */ Set $unreadChannelIds$inlined;
public final /* synthetic */ Map $voiceStates$inlined; public final /* synthetic */ Map $voiceStates$inlined;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$4(WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1 widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1, GuildChannelsInfo guildChannelsInfo, HashSet hashSet, Channel channel, Map map, Set set, long j, WidgetChannelListModel$Companion$guildListBuilder$4 widgetChannelListModel$Companion$guildListBuilder$4, Set set2, WidgetChannelListModel$Companion$guildListBuilder$2 widgetChannelListModel$Companion$guildListBuilder$2, HashSet hashSet2, WidgetChannelListModel$Companion$guildListBuilder$3 widgetChannelListModel$Companion$guildListBuilder$3, long j2, Map map2, Set set3, List list, Map map3, Map map4, Map map5, ArrayList arrayList, WidgetChannelListModel$Companion$guildListBuilder$1 widgetChannelListModel$Companion$guildListBuilder$1) { public WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$4(WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1 widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1, GuildChannelsInfo guildChannelsInfo, HashSet hashSet, Channel channel, Map map, Set set, long j, WidgetChannelListModel$Companion$guildListBuilder$5 widgetChannelListModel$Companion$guildListBuilder$5, Set set2, WidgetChannelListModel$Companion$guildListBuilder$3 widgetChannelListModel$Companion$guildListBuilder$3, HashSet hashSet2, WidgetChannelListModel$Companion$guildListBuilder$4 widgetChannelListModel$Companion$guildListBuilder$4, long j2, Map map2, Set set3, List list, Map map3, Map map4, Map map5, ArrayList arrayList, WidgetChannelListModel$Companion$guildListBuilder$2 widgetChannelListModel$Companion$guildListBuilder$2) {
super(1); super(1);
this.$getTextLikeChannelData$1 = widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1; this.$getTextLikeChannelData$1 = widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$1;
this.$guild$inlined = guildChannelsInfo; this.$guild$inlined = guildChannelsInfo;
@ -48,11 +48,11 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
this.$mentionCounts$inlined = map; this.$mentionCounts$inlined = map;
this.$unreadChannelIds$inlined = set; this.$unreadChannelIds$inlined = set;
this.$selectedGuildId$inlined = j; this.$selectedGuildId$inlined = j;
this.$areAnyChildThreadsSelected$4$inlined = widgetChannelListModel$Companion$guildListBuilder$4; this.$areAnyChildThreadsSelected$5$inlined = widgetChannelListModel$Companion$guildListBuilder$5;
this.$collapsedCategories$inlined = set2; this.$collapsedCategories$inlined = set2;
this.$isThreadUnread$2$inlined = widgetChannelListModel$Companion$guildListBuilder$2; this.$isThreadUnread$3$inlined = widgetChannelListModel$Companion$guildListBuilder$3;
this.$hiddenChannelsIds$inlined = hashSet2; this.$hiddenChannelsIds$inlined = hashSet2;
this.$areAllChildThreadsRead$3$inlined = widgetChannelListModel$Companion$guildListBuilder$3; this.$areAllChildThreadsRead$4$inlined = widgetChannelListModel$Companion$guildListBuilder$4;
this.$selectedVoiceChannelId$inlined = j2; this.$selectedVoiceChannelId$inlined = j2;
this.$voiceStates$inlined = map2; this.$voiceStates$inlined = map2;
this.$channelsWithActiveThreads$inlined = set3; this.$channelsWithActiveThreads$inlined = set3;
@ -61,7 +61,7 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
this.$stageChannels$inlined = map4; this.$stageChannels$inlined = map4;
this.$threadParentMap$inlined = map5; this.$threadParentMap$inlined = map5;
this.$items$inlined = arrayList; this.$items$inlined = arrayList;
this.$tryRemoveEmptyCategory$1$inlined = widgetChannelListModel$Companion$guildListBuilder$1; this.$tryRemoveEmptyCategory$2$inlined = widgetChannelListModel$Companion$guildListBuilder$2;
} }
public final ChannelListItemThread invoke(Channel channel) { public final ChannelListItemThread invoke(Channel channel) {

View file

@ -21,8 +21,8 @@ import java.util.Set;
import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function0;
/* compiled from: WidgetChannelListModel.kt */ /* compiled from: WidgetChannelListModel.kt */
public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$5 extends o implements Function0<ChannelListItemVoiceChannel> { public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$5 extends o implements Function0<ChannelListItemVoiceChannel> {
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$3 $areAllChildThreadsRead$3$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$4 $areAllChildThreadsRead$4$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$4 $areAnyChildThreadsSelected$4$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$5 $areAnyChildThreadsSelected$5$inlined;
public final /* synthetic */ Channel $channel; public final /* synthetic */ Channel $channel;
public final /* synthetic */ Set $channelsWithActiveThreads$inlined; public final /* synthetic */ Set $channelsWithActiveThreads$inlined;
public final /* synthetic */ Set $collapsedCategories$inlined; public final /* synthetic */ Set $collapsedCategories$inlined;
@ -31,7 +31,7 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
public final /* synthetic */ GuildChannelsInfo $guild$inlined; public final /* synthetic */ GuildChannelsInfo $guild$inlined;
public final /* synthetic */ List $guildScheduledEvents$inlined; public final /* synthetic */ List $guildScheduledEvents$inlined;
public final /* synthetic */ HashSet $hiddenChannelsIds$inlined; public final /* synthetic */ HashSet $hiddenChannelsIds$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$2 $isThreadUnread$2$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$3 $isThreadUnread$3$inlined;
public final /* synthetic */ ArrayList $items$inlined; public final /* synthetic */ ArrayList $items$inlined;
public final /* synthetic */ Map $mentionCounts$inlined; public final /* synthetic */ Map $mentionCounts$inlined;
public final /* synthetic */ Long $permissions; public final /* synthetic */ Long $permissions;
@ -41,12 +41,12 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
public final /* synthetic */ Map $stageChannels$inlined; public final /* synthetic */ Map $stageChannels$inlined;
public final /* synthetic */ Map $stageInstances$inlined; public final /* synthetic */ Map $stageInstances$inlined;
public final /* synthetic */ Map $threadParentMap$inlined; public final /* synthetic */ Map $threadParentMap$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$1 $tryRemoveEmptyCategory$1$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$2 $tryRemoveEmptyCategory$2$inlined;
public final /* synthetic */ Set $unreadChannelIds$inlined; public final /* synthetic */ Set $unreadChannelIds$inlined;
public final /* synthetic */ Map $voiceStates$inlined; public final /* synthetic */ Map $voiceStates$inlined;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$5(WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$2 widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$2, Channel channel, Long l, GuildChannelsInfo guildChannelsInfo, HashSet hashSet, Channel channel2, Map map, Set set, long j, WidgetChannelListModel$Companion$guildListBuilder$4 widgetChannelListModel$Companion$guildListBuilder$4, Set set2, WidgetChannelListModel$Companion$guildListBuilder$2 widgetChannelListModel$Companion$guildListBuilder$2, HashSet hashSet2, WidgetChannelListModel$Companion$guildListBuilder$3 widgetChannelListModel$Companion$guildListBuilder$3, long j2, Map map2, Set set3, List list, Map map3, Map map4, Map map5, ArrayList arrayList, WidgetChannelListModel$Companion$guildListBuilder$1 widgetChannelListModel$Companion$guildListBuilder$1) { public WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$5(WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$2 widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$2, Channel channel, Long l, GuildChannelsInfo guildChannelsInfo, HashSet hashSet, Channel channel2, Map map, Set set, long j, WidgetChannelListModel$Companion$guildListBuilder$5 widgetChannelListModel$Companion$guildListBuilder$5, Set set2, WidgetChannelListModel$Companion$guildListBuilder$3 widgetChannelListModel$Companion$guildListBuilder$3, HashSet hashSet2, WidgetChannelListModel$Companion$guildListBuilder$4 widgetChannelListModel$Companion$guildListBuilder$4, long j2, Map map2, Set set3, List list, Map map3, Map map4, Map map5, ArrayList arrayList, WidgetChannelListModel$Companion$guildListBuilder$2 widgetChannelListModel$Companion$guildListBuilder$2) {
super(0); super(0);
this.$getVocalChannelData$2 = widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$2; this.$getVocalChannelData$2 = widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$2;
this.$channel = channel; this.$channel = channel;
@ -57,11 +57,11 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
this.$mentionCounts$inlined = map; this.$mentionCounts$inlined = map;
this.$unreadChannelIds$inlined = set; this.$unreadChannelIds$inlined = set;
this.$selectedGuildId$inlined = j; this.$selectedGuildId$inlined = j;
this.$areAnyChildThreadsSelected$4$inlined = widgetChannelListModel$Companion$guildListBuilder$4; this.$areAnyChildThreadsSelected$5$inlined = widgetChannelListModel$Companion$guildListBuilder$5;
this.$collapsedCategories$inlined = set2; this.$collapsedCategories$inlined = set2;
this.$isThreadUnread$2$inlined = widgetChannelListModel$Companion$guildListBuilder$2; this.$isThreadUnread$3$inlined = widgetChannelListModel$Companion$guildListBuilder$3;
this.$hiddenChannelsIds$inlined = hashSet2; this.$hiddenChannelsIds$inlined = hashSet2;
this.$areAllChildThreadsRead$3$inlined = widgetChannelListModel$Companion$guildListBuilder$3; this.$areAllChildThreadsRead$4$inlined = widgetChannelListModel$Companion$guildListBuilder$4;
this.$selectedVoiceChannelId$inlined = j2; this.$selectedVoiceChannelId$inlined = j2;
this.$voiceStates$inlined = map2; this.$voiceStates$inlined = map2;
this.$channelsWithActiveThreads$inlined = set3; this.$channelsWithActiveThreads$inlined = set3;
@ -70,7 +70,7 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
this.$stageChannels$inlined = map4; this.$stageChannels$inlined = map4;
this.$threadParentMap$inlined = map5; this.$threadParentMap$inlined = map5;
this.$items$inlined = arrayList; this.$items$inlined = arrayList;
this.$tryRemoveEmptyCategory$1$inlined = widgetChannelListModel$Companion$guildListBuilder$1; this.$tryRemoveEmptyCategory$2$inlined = widgetChannelListModel$Companion$guildListBuilder$2;
} }
/* JADX DEBUG: Multi-variable search result rejected for r3v1, resolved type: java.lang.Object */ /* JADX DEBUG: Multi-variable search result rejected for r3v1, resolved type: java.lang.Object */

View file

@ -16,8 +16,8 @@ import java.util.Set;
import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function0;
/* compiled from: WidgetChannelListModel.kt */ /* compiled from: WidgetChannelListModel.kt */
public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$6 extends o implements Function0<ChannelListItemStageVoiceChannel> { public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$6 extends o implements Function0<ChannelListItemStageVoiceChannel> {
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$3 $areAllChildThreadsRead$3$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$4 $areAllChildThreadsRead$4$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$4 $areAnyChildThreadsSelected$4$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$5 $areAnyChildThreadsSelected$5$inlined;
public final /* synthetic */ Channel $channel; public final /* synthetic */ Channel $channel;
public final /* synthetic */ Set $channelsWithActiveThreads$inlined; public final /* synthetic */ Set $channelsWithActiveThreads$inlined;
public final /* synthetic */ Set $collapsedCategories$inlined; public final /* synthetic */ Set $collapsedCategories$inlined;
@ -26,7 +26,7 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
public final /* synthetic */ GuildChannelsInfo $guild$inlined; public final /* synthetic */ GuildChannelsInfo $guild$inlined;
public final /* synthetic */ List $guildScheduledEvents$inlined; public final /* synthetic */ List $guildScheduledEvents$inlined;
public final /* synthetic */ HashSet $hiddenChannelsIds$inlined; public final /* synthetic */ HashSet $hiddenChannelsIds$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$2 $isThreadUnread$2$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$3 $isThreadUnread$3$inlined;
public final /* synthetic */ ArrayList $items$inlined; public final /* synthetic */ ArrayList $items$inlined;
public final /* synthetic */ Map $mentionCounts$inlined; public final /* synthetic */ Map $mentionCounts$inlined;
public final /* synthetic */ Long $permissions; public final /* synthetic */ Long $permissions;
@ -36,12 +36,12 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
public final /* synthetic */ Map $stageChannels$inlined; public final /* synthetic */ Map $stageChannels$inlined;
public final /* synthetic */ Map $stageInstances$inlined; public final /* synthetic */ Map $stageInstances$inlined;
public final /* synthetic */ Map $threadParentMap$inlined; public final /* synthetic */ Map $threadParentMap$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$1 $tryRemoveEmptyCategory$1$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$2 $tryRemoveEmptyCategory$2$inlined;
public final /* synthetic */ Set $unreadChannelIds$inlined; public final /* synthetic */ Set $unreadChannelIds$inlined;
public final /* synthetic */ Map $voiceStates$inlined; public final /* synthetic */ Map $voiceStates$inlined;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$6(WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$2 widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$2, Channel channel, Long l, GuildChannelsInfo guildChannelsInfo, HashSet hashSet, Channel channel2, Map map, Set set, long j, WidgetChannelListModel$Companion$guildListBuilder$4 widgetChannelListModel$Companion$guildListBuilder$4, Set set2, WidgetChannelListModel$Companion$guildListBuilder$2 widgetChannelListModel$Companion$guildListBuilder$2, HashSet hashSet2, WidgetChannelListModel$Companion$guildListBuilder$3 widgetChannelListModel$Companion$guildListBuilder$3, long j2, Map map2, Set set3, List list, Map map3, Map map4, Map map5, ArrayList arrayList, WidgetChannelListModel$Companion$guildListBuilder$1 widgetChannelListModel$Companion$guildListBuilder$1) { public WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$6(WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$2 widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$2, Channel channel, Long l, GuildChannelsInfo guildChannelsInfo, HashSet hashSet, Channel channel2, Map map, Set set, long j, WidgetChannelListModel$Companion$guildListBuilder$5 widgetChannelListModel$Companion$guildListBuilder$5, Set set2, WidgetChannelListModel$Companion$guildListBuilder$3 widgetChannelListModel$Companion$guildListBuilder$3, HashSet hashSet2, WidgetChannelListModel$Companion$guildListBuilder$4 widgetChannelListModel$Companion$guildListBuilder$4, long j2, Map map2, Set set3, List list, Map map3, Map map4, Map map5, ArrayList arrayList, WidgetChannelListModel$Companion$guildListBuilder$2 widgetChannelListModel$Companion$guildListBuilder$2) {
super(0); super(0);
this.$getVocalChannelData$2 = widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$2; this.$getVocalChannelData$2 = widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$2;
this.$channel = channel; this.$channel = channel;
@ -52,11 +52,11 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
this.$mentionCounts$inlined = map; this.$mentionCounts$inlined = map;
this.$unreadChannelIds$inlined = set; this.$unreadChannelIds$inlined = set;
this.$selectedGuildId$inlined = j; this.$selectedGuildId$inlined = j;
this.$areAnyChildThreadsSelected$4$inlined = widgetChannelListModel$Companion$guildListBuilder$4; this.$areAnyChildThreadsSelected$5$inlined = widgetChannelListModel$Companion$guildListBuilder$5;
this.$collapsedCategories$inlined = set2; this.$collapsedCategories$inlined = set2;
this.$isThreadUnread$2$inlined = widgetChannelListModel$Companion$guildListBuilder$2; this.$isThreadUnread$3$inlined = widgetChannelListModel$Companion$guildListBuilder$3;
this.$hiddenChannelsIds$inlined = hashSet2; this.$hiddenChannelsIds$inlined = hashSet2;
this.$areAllChildThreadsRead$3$inlined = widgetChannelListModel$Companion$guildListBuilder$3; this.$areAllChildThreadsRead$4$inlined = widgetChannelListModel$Companion$guildListBuilder$4;
this.$selectedVoiceChannelId$inlined = j2; this.$selectedVoiceChannelId$inlined = j2;
this.$voiceStates$inlined = map2; this.$voiceStates$inlined = map2;
this.$channelsWithActiveThreads$inlined = set3; this.$channelsWithActiveThreads$inlined = set3;
@ -65,7 +65,7 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
this.$stageChannels$inlined = map4; this.$stageChannels$inlined = map4;
this.$threadParentMap$inlined = map5; this.$threadParentMap$inlined = map5;
this.$items$inlined = arrayList; this.$items$inlined = arrayList;
this.$tryRemoveEmptyCategory$1$inlined = widgetChannelListModel$Companion$guildListBuilder$1; this.$tryRemoveEmptyCategory$2$inlined = widgetChannelListModel$Companion$guildListBuilder$2;
} }
@Override // kotlin.jvm.functions.Function0 @Override // kotlin.jvm.functions.Function0

View file

@ -16,15 +16,15 @@ import java.util.Set;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetChannelListModel.kt */ /* compiled from: WidgetChannelListModel.kt */
public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$7 extends o implements Function1<Channel, Collection<? extends ChannelListItemThread>> { public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$7 extends o implements Function1<Channel, Collection<? extends ChannelListItemThread>> {
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$3 $areAllChildThreadsRead$3$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$4 $areAllChildThreadsRead$4$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$4 $areAnyChildThreadsSelected$4$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$5 $areAnyChildThreadsSelected$5$inlined;
public final /* synthetic */ Set $channelsWithActiveThreads$inlined; public final /* synthetic */ Set $channelsWithActiveThreads$inlined;
public final /* synthetic */ Set $collapsedCategories$inlined; public final /* synthetic */ Set $collapsedCategories$inlined;
public final /* synthetic */ HashSet $forceViewCategories$inlined; public final /* synthetic */ HashSet $forceViewCategories$inlined;
public final /* synthetic */ GuildChannelsInfo $guild$inlined; public final /* synthetic */ GuildChannelsInfo $guild$inlined;
public final /* synthetic */ List $guildScheduledEvents$inlined; public final /* synthetic */ List $guildScheduledEvents$inlined;
public final /* synthetic */ HashSet $hiddenChannelsIds$inlined; public final /* synthetic */ HashSet $hiddenChannelsIds$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$2 $isThreadUnread$2$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$3 $isThreadUnread$3$inlined;
public final /* synthetic */ ArrayList $items$inlined; public final /* synthetic */ ArrayList $items$inlined;
public final /* synthetic */ Map $mentionCounts$inlined; public final /* synthetic */ Map $mentionCounts$inlined;
public final /* synthetic */ Channel $selectedChannel$inlined; public final /* synthetic */ Channel $selectedChannel$inlined;
@ -34,12 +34,12 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
public final /* synthetic */ Map $stageInstances$inlined; public final /* synthetic */ Map $stageInstances$inlined;
public final /* synthetic */ Map $threadParentMap$inlined; public final /* synthetic */ Map $threadParentMap$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$4 $toChannelListItemThread$4; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$4 $toChannelListItemThread$4;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$1 $tryRemoveEmptyCategory$1$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$2 $tryRemoveEmptyCategory$2$inlined;
public final /* synthetic */ Set $unreadChannelIds$inlined; public final /* synthetic */ Set $unreadChannelIds$inlined;
public final /* synthetic */ Map $voiceStates$inlined; public final /* synthetic */ Map $voiceStates$inlined;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$7(WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$4 widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$4, GuildChannelsInfo guildChannelsInfo, HashSet hashSet, Channel channel, Map map, Set set, long j, WidgetChannelListModel$Companion$guildListBuilder$4 widgetChannelListModel$Companion$guildListBuilder$4, Set set2, WidgetChannelListModel$Companion$guildListBuilder$2 widgetChannelListModel$Companion$guildListBuilder$2, HashSet hashSet2, WidgetChannelListModel$Companion$guildListBuilder$3 widgetChannelListModel$Companion$guildListBuilder$3, long j2, Map map2, Set set3, List list, Map map3, Map map4, Map map5, ArrayList arrayList, WidgetChannelListModel$Companion$guildListBuilder$1 widgetChannelListModel$Companion$guildListBuilder$1) { public WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$7(WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$4 widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$4, GuildChannelsInfo guildChannelsInfo, HashSet hashSet, Channel channel, Map map, Set set, long j, WidgetChannelListModel$Companion$guildListBuilder$5 widgetChannelListModel$Companion$guildListBuilder$5, Set set2, WidgetChannelListModel$Companion$guildListBuilder$3 widgetChannelListModel$Companion$guildListBuilder$3, HashSet hashSet2, WidgetChannelListModel$Companion$guildListBuilder$4 widgetChannelListModel$Companion$guildListBuilder$4, long j2, Map map2, Set set3, List list, Map map3, Map map4, Map map5, ArrayList arrayList, WidgetChannelListModel$Companion$guildListBuilder$2 widgetChannelListModel$Companion$guildListBuilder$2) {
super(1); super(1);
this.$toChannelListItemThread$4 = widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$4; this.$toChannelListItemThread$4 = widgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$4;
this.$guild$inlined = guildChannelsInfo; this.$guild$inlined = guildChannelsInfo;
@ -48,11 +48,11 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
this.$mentionCounts$inlined = map; this.$mentionCounts$inlined = map;
this.$unreadChannelIds$inlined = set; this.$unreadChannelIds$inlined = set;
this.$selectedGuildId$inlined = j; this.$selectedGuildId$inlined = j;
this.$areAnyChildThreadsSelected$4$inlined = widgetChannelListModel$Companion$guildListBuilder$4; this.$areAnyChildThreadsSelected$5$inlined = widgetChannelListModel$Companion$guildListBuilder$5;
this.$collapsedCategories$inlined = set2; this.$collapsedCategories$inlined = set2;
this.$isThreadUnread$2$inlined = widgetChannelListModel$Companion$guildListBuilder$2; this.$isThreadUnread$3$inlined = widgetChannelListModel$Companion$guildListBuilder$3;
this.$hiddenChannelsIds$inlined = hashSet2; this.$hiddenChannelsIds$inlined = hashSet2;
this.$areAllChildThreadsRead$3$inlined = widgetChannelListModel$Companion$guildListBuilder$3; this.$areAllChildThreadsRead$4$inlined = widgetChannelListModel$Companion$guildListBuilder$4;
this.$selectedVoiceChannelId$inlined = j2; this.$selectedVoiceChannelId$inlined = j2;
this.$voiceStates$inlined = map2; this.$voiceStates$inlined = map2;
this.$channelsWithActiveThreads$inlined = set3; this.$channelsWithActiveThreads$inlined = set3;
@ -61,7 +61,7 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
this.$stageChannels$inlined = map4; this.$stageChannels$inlined = map4;
this.$threadParentMap$inlined = map5; this.$threadParentMap$inlined = map5;
this.$items$inlined = arrayList; this.$items$inlined = arrayList;
this.$tryRemoveEmptyCategory$1$inlined = widgetChannelListModel$Companion$guildListBuilder$1; this.$tryRemoveEmptyCategory$2$inlined = widgetChannelListModel$Companion$guildListBuilder$2;
} }
public final Collection<ChannelListItemThread> invoke(Channel channel) { public final Collection<ChannelListItemThread> invoke(Channel channel) {
@ -80,14 +80,14 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
list = n.emptyList(); list = n.emptyList();
} }
int size = list.size(); int size = list.size();
WidgetChannelListModel$Companion$guildListBuilder$5$7$1 widgetChannelListModel$Companion$guildListBuilder$5$7$1 = WidgetChannelListModel$Companion$guildListBuilder$5$7$1.INSTANCE; WidgetChannelListModel$Companion$guildListBuilder$6$7$1 widgetChannelListModel$Companion$guildListBuilder$6$7$1 = WidgetChannelListModel$Companion$guildListBuilder$6$7$1.INSTANCE;
int i = 0; int i = 0;
for (Object obj : list) { for (Object obj : list) {
int i2 = i + 1; int i2 = i + 1;
if (i < 0) { if (i < 0) {
n.throwIndexOverflow(); n.throwIndexOverflow();
} }
((ChannelListItemThread) obj).setSpineType(WidgetChannelListModel$Companion$guildListBuilder$5$7$1.INSTANCE.invoke(i, size)); ((ChannelListItemThread) obj).setSpineType(WidgetChannelListModel$Companion$guildListBuilder$6$7$1.INSTANCE.invoke(i, size));
i = i2; i = i2;
} }
return list; return list;

View file

@ -16,8 +16,8 @@ import java.util.Set;
import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function0;
/* compiled from: WidgetChannelListModel.kt */ /* compiled from: WidgetChannelListModel.kt */
public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$8 extends o implements Function0<Collection<? extends ChannelListItemVoiceUser>> { public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$8 extends o implements Function0<Collection<? extends ChannelListItemVoiceUser>> {
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$3 $areAllChildThreadsRead$3$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$4 $areAllChildThreadsRead$4$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$4 $areAnyChildThreadsSelected$4$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$5 $areAnyChildThreadsSelected$5$inlined;
public final /* synthetic */ long $channelId; public final /* synthetic */ long $channelId;
public final /* synthetic */ Set $channelsWithActiveThreads$inlined; public final /* synthetic */ Set $channelsWithActiveThreads$inlined;
public final /* synthetic */ Set $collapsedCategories$inlined; public final /* synthetic */ Set $collapsedCategories$inlined;
@ -25,7 +25,7 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
public final /* synthetic */ GuildChannelsInfo $guild$inlined; public final /* synthetic */ GuildChannelsInfo $guild$inlined;
public final /* synthetic */ List $guildScheduledEvents$inlined; public final /* synthetic */ List $guildScheduledEvents$inlined;
public final /* synthetic */ HashSet $hiddenChannelsIds$inlined; public final /* synthetic */ HashSet $hiddenChannelsIds$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$2 $isThreadUnread$2$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$3 $isThreadUnread$3$inlined;
public final /* synthetic */ ArrayList $items$inlined; public final /* synthetic */ ArrayList $items$inlined;
public final /* synthetic */ Map $mentionCounts$inlined; public final /* synthetic */ Map $mentionCounts$inlined;
public final /* synthetic */ Channel $selectedChannel$inlined; public final /* synthetic */ Channel $selectedChannel$inlined;
@ -34,12 +34,12 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
public final /* synthetic */ Map $stageChannels$inlined; public final /* synthetic */ Map $stageChannels$inlined;
public final /* synthetic */ Map $stageInstances$inlined; public final /* synthetic */ Map $stageInstances$inlined;
public final /* synthetic */ Map $threadParentMap$inlined; public final /* synthetic */ Map $threadParentMap$inlined;
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$1 $tryRemoveEmptyCategory$1$inlined; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$2 $tryRemoveEmptyCategory$2$inlined;
public final /* synthetic */ Set $unreadChannelIds$inlined; public final /* synthetic */ Set $unreadChannelIds$inlined;
public final /* synthetic */ Map $voiceStates$inlined; public final /* synthetic */ Map $voiceStates$inlined;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$8(long j, GuildChannelsInfo guildChannelsInfo, HashSet hashSet, Channel channel, Map map, Set set, long j2, WidgetChannelListModel$Companion$guildListBuilder$4 widgetChannelListModel$Companion$guildListBuilder$4, Set set2, WidgetChannelListModel$Companion$guildListBuilder$2 widgetChannelListModel$Companion$guildListBuilder$2, HashSet hashSet2, WidgetChannelListModel$Companion$guildListBuilder$3 widgetChannelListModel$Companion$guildListBuilder$3, long j3, Map map2, Set set3, List list, Map map3, Map map4, Map map5, ArrayList arrayList, WidgetChannelListModel$Companion$guildListBuilder$1 widgetChannelListModel$Companion$guildListBuilder$1) { public WidgetChannelListModel$Companion$guildListBuilder$$inlined$forEach$lambda$8(long j, GuildChannelsInfo guildChannelsInfo, HashSet hashSet, Channel channel, Map map, Set set, long j2, WidgetChannelListModel$Companion$guildListBuilder$5 widgetChannelListModel$Companion$guildListBuilder$5, Set set2, WidgetChannelListModel$Companion$guildListBuilder$3 widgetChannelListModel$Companion$guildListBuilder$3, HashSet hashSet2, WidgetChannelListModel$Companion$guildListBuilder$4 widgetChannelListModel$Companion$guildListBuilder$4, long j3, Map map2, Set set3, List list, Map map3, Map map4, Map map5, ArrayList arrayList, WidgetChannelListModel$Companion$guildListBuilder$2 widgetChannelListModel$Companion$guildListBuilder$2) {
super(0); super(0);
this.$channelId = j; this.$channelId = j;
this.$guild$inlined = guildChannelsInfo; this.$guild$inlined = guildChannelsInfo;
@ -48,11 +48,11 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
this.$mentionCounts$inlined = map; this.$mentionCounts$inlined = map;
this.$unreadChannelIds$inlined = set; this.$unreadChannelIds$inlined = set;
this.$selectedGuildId$inlined = j2; this.$selectedGuildId$inlined = j2;
this.$areAnyChildThreadsSelected$4$inlined = widgetChannelListModel$Companion$guildListBuilder$4; this.$areAnyChildThreadsSelected$5$inlined = widgetChannelListModel$Companion$guildListBuilder$5;
this.$collapsedCategories$inlined = set2; this.$collapsedCategories$inlined = set2;
this.$isThreadUnread$2$inlined = widgetChannelListModel$Companion$guildListBuilder$2; this.$isThreadUnread$3$inlined = widgetChannelListModel$Companion$guildListBuilder$3;
this.$hiddenChannelsIds$inlined = hashSet2; this.$hiddenChannelsIds$inlined = hashSet2;
this.$areAllChildThreadsRead$3$inlined = widgetChannelListModel$Companion$guildListBuilder$3; this.$areAllChildThreadsRead$4$inlined = widgetChannelListModel$Companion$guildListBuilder$4;
this.$selectedVoiceChannelId$inlined = j3; this.$selectedVoiceChannelId$inlined = j3;
this.$voiceStates$inlined = map2; this.$voiceStates$inlined = map2;
this.$channelsWithActiveThreads$inlined = set3; this.$channelsWithActiveThreads$inlined = set3;
@ -61,7 +61,7 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$$inlined$fo
this.$stageChannels$inlined = map4; this.$stageChannels$inlined = map4;
this.$threadParentMap$inlined = map5; this.$threadParentMap$inlined = map5;
this.$items$inlined = arrayList; this.$items$inlined = arrayList;
this.$tryRemoveEmptyCategory$1$inlined = widgetChannelListModel$Companion$guildListBuilder$1; this.$tryRemoveEmptyCategory$2$inlined = widgetChannelListModel$Companion$guildListBuilder$2;
} }
/* Return type fixed from 'java.util.Collection<com.discord.widgets.channels.list.items.ChannelListItemVoiceUser>' to match base method */ /* Return type fixed from 'java.util.Collection<com.discord.widgets.channels.list.items.ChannelListItemVoiceUser>' to match base method */

View file

@ -1,39 +0,0 @@
package com.discord.widgets.channels.list;
import com.discord.widgets.channels.list.items.ChannelListItem;
import com.discord.widgets.channels.list.items.ChannelListItemCategory;
import d0.t.u;
import d0.z.d.o;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
/* compiled from: WidgetChannelListModel.kt */
public final class WidgetChannelListModel$Companion$guildListBuilder$1 extends o implements Function0<Unit> {
public final /* synthetic */ Set $collapsedCategories;
public final /* synthetic */ HashSet $forceViewCategories;
public final /* synthetic */ ArrayList $items;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetChannelListModel$Companion$guildListBuilder$1(ArrayList arrayList, HashSet hashSet, Set set) {
super(0);
this.$items = arrayList;
this.$forceViewCategories = hashSet;
this.$collapsedCategories = set;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
ChannelListItem channelListItem = (ChannelListItem) u.lastOrNull((List<? extends Object>) this.$items);
if (channelListItem != null && channelListItem.getType() == 8 && (channelListItem instanceof ChannelListItemCategory)) {
long h = ((ChannelListItemCategory) channelListItem).getChannel().h();
if (!this.$forceViewCategories.contains(Long.valueOf(h)) && !this.$collapsedCategories.contains(Long.valueOf(h))) {
ArrayList arrayList = this.$items;
arrayList.remove(arrayList.size() - 1);
}
}
}
}

View file

@ -1,29 +1,39 @@
package com.discord.widgets.channels.list; package com.discord.widgets.channels.list;
import com.discord.api.channel.Channel; import com.discord.widgets.channels.list.items.ChannelListItem;
import d0.z.d.m; import com.discord.widgets.channels.list.items.ChannelListItemCategory;
import d0.t.u;
import d0.z.d.o; import d0.z.d.o;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set; import java.util.Set;
import kotlin.jvm.functions.Function1; import kotlin.Unit;
import kotlin.jvm.functions.Function0;
/* compiled from: WidgetChannelListModel.kt */ /* compiled from: WidgetChannelListModel.kt */
public final class WidgetChannelListModel$Companion$guildListBuilder$2 extends o implements Function1<Channel, Boolean> { public final class WidgetChannelListModel$Companion$guildListBuilder$2 extends o implements Function0<Unit> {
public final /* synthetic */ Set $unreadChannelIds; public final /* synthetic */ Set $collapsedCategories;
public final /* synthetic */ HashSet $forceViewCategories;
public final /* synthetic */ ArrayList $items;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetChannelListModel$Companion$guildListBuilder$2(Set set) { public WidgetChannelListModel$Companion$guildListBuilder$2(ArrayList arrayList, HashSet hashSet, Set set) {
super(1); super(0);
this.$unreadChannelIds = set; this.$items = arrayList;
this.$forceViewCategories = hashSet;
this.$collapsedCategories = set;
} }
/* Return type fixed from 'java.lang.Object' to match base method */ @Override // kotlin.jvm.functions.Function0
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ /* renamed from: invoke */
@Override // kotlin.jvm.functions.Function1 public final void mo1invoke() {
public /* bridge */ /* synthetic */ Boolean invoke(Channel channel) { ChannelListItem channelListItem = (ChannelListItem) u.lastOrNull((List<? extends Object>) this.$items);
return Boolean.valueOf(invoke(channel)); if (channelListItem != null && channelListItem.getType() == 8 && (channelListItem instanceof ChannelListItemCategory)) {
} long h = ((ChannelListItemCategory) channelListItem).getChannel().h();
if (!this.$forceViewCategories.contains(Long.valueOf(h)) && !this.$collapsedCategories.contains(Long.valueOf(h))) {
public final boolean invoke(Channel channel) { ArrayList arrayList = this.$items;
m.checkNotNullParameter(channel, "thread"); arrayList.remove(arrayList.size() - 1);
return this.$unreadChannelIds.contains(Long.valueOf(channel.h())); }
}
} }
} }

View file

@ -1,39 +1,29 @@
package com.discord.widgets.channels.list; package com.discord.widgets.channels.list;
import com.discord.api.channel.Channel; import com.discord.api.channel.Channel;
import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import java.util.Collection; import java.util.Set;
import java.util.Map;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetChannelListModel.kt */ /* compiled from: WidgetChannelListModel.kt */
public final class WidgetChannelListModel$Companion$guildListBuilder$3 extends o implements Function1<Long, Boolean> { public final class WidgetChannelListModel$Companion$guildListBuilder$3 extends o implements Function1<Channel, Boolean> {
public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$2 $isThreadUnread$2; public final /* synthetic */ Set $unreadChannelIds;
public final /* synthetic */ Map $threadParentMap;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetChannelListModel$Companion$guildListBuilder$3(Map map, WidgetChannelListModel$Companion$guildListBuilder$2 widgetChannelListModel$Companion$guildListBuilder$2) { public WidgetChannelListModel$Companion$guildListBuilder$3(Set set) {
super(1); super(1);
this.$threadParentMap = map; this.$unreadChannelIds = set;
this.$isThreadUnread$2 = widgetChannelListModel$Companion$guildListBuilder$2;
} }
/* Return type fixed from 'java.lang.Object' to match base method */ /* 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] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1 @Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Boolean invoke(Long l) { public /* bridge */ /* synthetic */ Boolean invoke(Channel channel) {
return Boolean.valueOf(invoke(l.longValue())); return Boolean.valueOf(invoke(channel));
} }
public final boolean invoke(long j) { public final boolean invoke(Channel channel) {
Collection<Channel> collection = (Collection) this.$threadParentMap.get(Long.valueOf(j)); m.checkNotNullParameter(channel, "thread");
if (collection == null) { return this.$unreadChannelIds.contains(Long.valueOf(channel.h()));
return true;
}
for (Channel channel : collection) {
if (this.$isThreadUnread$2.invoke(channel)) {
return false;
}
}
return true;
} }
} }

View file

@ -7,14 +7,14 @@ import java.util.Map;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetChannelListModel.kt */ /* compiled from: WidgetChannelListModel.kt */
public final class WidgetChannelListModel$Companion$guildListBuilder$4 extends o implements Function1<Long, Boolean> { public final class WidgetChannelListModel$Companion$guildListBuilder$4 extends o implements Function1<Long, Boolean> {
public final /* synthetic */ Channel $selectedChannel; public final /* synthetic */ WidgetChannelListModel$Companion$guildListBuilder$3 $isThreadUnread$3;
public final /* synthetic */ Map $threadParentMap; public final /* synthetic */ Map $threadParentMap;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetChannelListModel$Companion$guildListBuilder$4(Map map, Channel channel) { public WidgetChannelListModel$Companion$guildListBuilder$4(Map map, WidgetChannelListModel$Companion$guildListBuilder$3 widgetChannelListModel$Companion$guildListBuilder$3) {
super(1); super(1);
this.$threadParentMap = map; this.$threadParentMap = map;
this.$selectedChannel = channel; this.$isThreadUnread$3 = widgetChannelListModel$Companion$guildListBuilder$3;
} }
/* Return type fixed from 'java.lang.Object' to match base method */ /* Return type fixed from 'java.lang.Object' to match base method */
@ -27,15 +27,13 @@ public final class WidgetChannelListModel$Companion$guildListBuilder$4 extends o
public final boolean invoke(long j) { public final boolean invoke(long j) {
Collection<Channel> collection = (Collection) this.$threadParentMap.get(Long.valueOf(j)); Collection<Channel> collection = (Collection) this.$threadParentMap.get(Long.valueOf(j));
if (collection == null) { if (collection == null) {
return false; return true;
} }
for (Channel channel : collection) { for (Channel channel : collection) {
long h = channel.h(); if (this.$isThreadUnread$3.invoke(channel)) {
Channel channel2 = this.$selectedChannel; return false;
if (channel2 != null && h == channel2.h()) {
return true;
} }
} }
return false; return true;
} }
} }

View file

@ -0,0 +1,41 @@
package com.discord.widgets.channels.list;
import com.discord.api.channel.Channel;
import d0.z.d.o;
import java.util.Collection;
import java.util.Map;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetChannelListModel.kt */
public final class WidgetChannelListModel$Companion$guildListBuilder$5 extends o implements Function1<Long, Boolean> {
public final /* synthetic */ Channel $selectedChannel;
public final /* synthetic */ Map $threadParentMap;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetChannelListModel$Companion$guildListBuilder$5(Map map, Channel channel) {
super(1);
this.$threadParentMap = map;
this.$selectedChannel = channel;
}
/* 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 */ Boolean invoke(Long l) {
return Boolean.valueOf(invoke(l.longValue()));
}
public final boolean invoke(long j) {
Collection<Channel> collection = (Collection) this.$threadParentMap.get(Long.valueOf(j));
if (collection == null) {
return false;
}
for (Channel channel : collection) {
long h = channel.h();
Channel channel2 = this.$selectedChannel;
if (channel2 != null && h == channel2.h()) {
return true;
}
}
return false;
}
}

View file

@ -4,10 +4,10 @@ import com.discord.widgets.channels.list.WidgetChannelListModel;
import d0.z.d.o; import d0.z.d.o;
import kotlin.jvm.functions.Function2; import kotlin.jvm.functions.Function2;
/* compiled from: WidgetChannelListModel.kt */ /* compiled from: WidgetChannelListModel.kt */
public final class WidgetChannelListModel$Companion$guildListBuilder$5$7$1 extends o implements Function2<Integer, Integer, WidgetChannelListModel.ThreadSpineType> { public final class WidgetChannelListModel$Companion$guildListBuilder$6$7$1 extends o implements Function2<Integer, Integer, WidgetChannelListModel.ThreadSpineType> {
public static final WidgetChannelListModel$Companion$guildListBuilder$5$7$1 INSTANCE = new WidgetChannelListModel$Companion$guildListBuilder$5$7$1(); public static final WidgetChannelListModel$Companion$guildListBuilder$6$7$1 INSTANCE = new WidgetChannelListModel$Companion$guildListBuilder$6$7$1();
public WidgetChannelListModel$Companion$guildListBuilder$5$7$1() { public WidgetChannelListModel$Companion$guildListBuilder$6$7$1() {
super(2); super(2);
} }

View file

@ -452,7 +452,7 @@ public final class WidgetChannelListModel {
*/ */
private final java.util.List<com.discord.widgets.channels.list.items.ChannelListItem> guildListBuilder(long r146, com.discord.utilities.channel.GuildChannelsInfo r148, java.util.Map<java.lang.Long, com.discord.api.channel.Channel> r149, java.util.Map<java.lang.Long, ? extends java.util.Map<java.lang.Long, com.discord.stores.StoreThreadsActiveJoined.ActiveJoinedThread>> r150, java.util.Set<java.lang.Long> r151, com.discord.api.channel.Channel r152, long r153, java.util.Map<java.lang.Long, ? extends java.util.Collection<com.discord.widgets.channels.list.items.ChannelListItemVoiceUser>> r155, java.util.Map<java.lang.Long, java.lang.Integer> r156, java.util.Set<java.lang.Long> r157, java.util.Set<java.lang.Long> r158, java.util.Map<java.lang.Long, com.discord.widgets.stage.model.StageChannel> r159, java.util.Map<java.lang.Long, com.discord.api.stageinstance.StageInstance> r160, java.util.List<com.discord.api.guildscheduledevent.GuildScheduledEvent> r161, boolean r162) { private final java.util.List<com.discord.widgets.channels.list.items.ChannelListItem> guildListBuilder(long r146, com.discord.utilities.channel.GuildChannelsInfo r148, java.util.Map<java.lang.Long, com.discord.api.channel.Channel> r149, java.util.Map<java.lang.Long, ? extends java.util.Map<java.lang.Long, com.discord.stores.StoreThreadsActiveJoined.ActiveJoinedThread>> r150, java.util.Set<java.lang.Long> r151, com.discord.api.channel.Channel r152, long r153, java.util.Map<java.lang.Long, ? extends java.util.Collection<com.discord.widgets.channels.list.items.ChannelListItemVoiceUser>> r155, java.util.Map<java.lang.Long, java.lang.Integer> r156, java.util.Set<java.lang.Long> r157, java.util.Set<java.lang.Long> r158, java.util.Map<java.lang.Long, com.discord.widgets.stage.model.StageChannel> r159, java.util.Map<java.lang.Long, com.discord.api.stageinstance.StageInstance> r160, java.util.List<com.discord.api.guildscheduledevent.GuildScheduledEvent> r161, boolean r162) {
/* /*
// Method dump skipped, instructions count: 1198 // Method dump skipped, instructions count: 1225
*/ */
throw new UnsupportedOperationException("Method not decompiled: com.discord.widgets.channels.list.WidgetChannelListModel.Companion.guildListBuilder(long, com.discord.utilities.channel.GuildChannelsInfo, java.util.Map, java.util.Map, java.util.Set, com.discord.api.channel.Channel, long, java.util.Map, java.util.Map, java.util.Set, java.util.Set, java.util.Map, java.util.Map, java.util.List, boolean):java.util.List"); throw new UnsupportedOperationException("Method not decompiled: com.discord.widgets.channels.list.WidgetChannelListModel.Companion.guildListBuilder(long, com.discord.utilities.channel.GuildChannelsInfo, java.util.Map, java.util.Map, java.util.Set, com.discord.api.channel.Channel, long, java.util.Map, java.util.Map, java.util.Set, java.util.Set, java.util.Map, java.util.Map, java.util.List, boolean):java.util.List");
} }

View file

@ -1,14 +1,13 @@
package com.discord.widgets.channels.list; package com.discord.widgets.channels.list;
import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentManager;
import com.discord.api.channel.Channel;
import com.discord.widgets.guildscheduledevent.WidgetGuildScheduledEventListBottomSheet; import com.discord.widgets.guildscheduledevent.WidgetGuildScheduledEventListBottomSheet;
import d0.z.d.m; import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetChannelsList.kt */ /* compiled from: WidgetChannelsList.kt */
public final class WidgetChannelsList$onViewBound$7 extends o implements Function1<Channel, Unit> { public final class WidgetChannelsList$onViewBound$7 extends o implements Function1<Long, Unit> {
public final /* synthetic */ WidgetChannelsList this$0; public final /* synthetic */ WidgetChannelsList this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -20,16 +19,15 @@ public final class WidgetChannelsList$onViewBound$7 extends o implements Functio
/* Return type fixed from 'java.lang.Object' to match base method */ /* 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] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1 @Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Channel channel) { public /* bridge */ /* synthetic */ Unit invoke(Long l) {
invoke(channel); invoke(l.longValue());
return Unit.a; return Unit.a;
} }
public final void invoke(Channel channel) { public final void invoke(long j) {
m.checkNotNullParameter(channel, "channel");
WidgetGuildScheduledEventListBottomSheet.Companion companion = WidgetGuildScheduledEventListBottomSheet.Companion; WidgetGuildScheduledEventListBottomSheet.Companion companion = WidgetGuildScheduledEventListBottomSheet.Companion;
FragmentManager parentFragmentManager = this.this$0.getParentFragmentManager(); FragmentManager parentFragmentManager = this.this$0.getParentFragmentManager();
m.checkNotNullExpressionValue(parentFragmentManager, "parentFragmentManager"); m.checkNotNullExpressionValue(parentFragmentManager, "parentFragmentManager");
WidgetGuildScheduledEventListBottomSheet.Companion.show$default(companion, parentFragmentManager, channel.f(), null, 4, null); WidgetGuildScheduledEventListBottomSheet.Companion.show$default(companion, parentFragmentManager, j, null, 4, null);
} }
} }

View file

@ -15,6 +15,6 @@ public final class WidgetChannelsListAdapter$ItemGuildScheduledEvents$onConfigur
@Override // android.view.View.OnClickListener @Override // android.view.View.OnClickListener
public final void onClick(View view) { public final void onClick(View view) {
WidgetChannelsListAdapter.ItemGuildScheduledEvents.access$getAdapter$p(this.this$0).getOnViewGuildScheduledEvents().invoke(this.$item.getChannel()); WidgetChannelsListAdapter.ItemGuildScheduledEvents.access$getAdapter$p(this.this$0).getOnViewGuildScheduledEvents().invoke(Long.valueOf(this.$item.getGuildId()));
} }
} }

View file

@ -1,12 +1,10 @@
package com.discord.widgets.channels.list; package com.discord.widgets.channels.list;
import com.discord.api.channel.Channel;
import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetChannelsListAdapter.kt */ /* compiled from: WidgetChannelsListAdapter.kt */
public final class WidgetChannelsListAdapter$onViewGuildScheduledEvents$1 extends o implements Function1<Channel, Unit> { public final class WidgetChannelsListAdapter$onViewGuildScheduledEvents$1 extends o implements Function1<Long, Unit> {
public static final WidgetChannelsListAdapter$onViewGuildScheduledEvents$1 INSTANCE = new WidgetChannelsListAdapter$onViewGuildScheduledEvents$1(); public static final WidgetChannelsListAdapter$onViewGuildScheduledEvents$1 INSTANCE = new WidgetChannelsListAdapter$onViewGuildScheduledEvents$1();
public WidgetChannelsListAdapter$onViewGuildScheduledEvents$1() { public WidgetChannelsListAdapter$onViewGuildScheduledEvents$1() {
@ -16,12 +14,11 @@ public final class WidgetChannelsListAdapter$onViewGuildScheduledEvents$1 extend
/* Return type fixed from 'java.lang.Object' to match base method */ /* 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] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1 @Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Channel channel) { public /* bridge */ /* synthetic */ Unit invoke(Long l) {
invoke(channel); invoke(l.longValue());
return Unit.a; return Unit.a;
} }
public final void invoke(Channel channel) { public final void invoke(long j) {
m.checkNotNullParameter(channel, "it");
} }
} }

View file

@ -104,7 +104,7 @@ public final class WidgetChannelsListAdapter extends MGRecyclerAdapterSimple<Cha
private Function1<? super View, Unit> onSelectInvite = WidgetChannelsListAdapter$onSelectInvite$1.INSTANCE; private Function1<? super View, Unit> onSelectInvite = WidgetChannelsListAdapter$onSelectInvite$1.INSTANCE;
private Function2<? super User, ? super Channel, Unit> onSelectUserOptions = WidgetChannelsListAdapter$onSelectUserOptions$1.INSTANCE; private Function2<? super User, ? super Channel, Unit> onSelectUserOptions = WidgetChannelsListAdapter$onSelectUserOptions$1.INSTANCE;
private Function0<Unit> onViewGuildRoleSubscriptions = WidgetChannelsListAdapter$onViewGuildRoleSubscriptions$1.INSTANCE; private Function0<Unit> onViewGuildRoleSubscriptions = WidgetChannelsListAdapter$onViewGuildRoleSubscriptions$1.INSTANCE;
private Function1<? super Channel, Unit> onViewGuildScheduledEvents = WidgetChannelsListAdapter$onViewGuildScheduledEvents$1.INSTANCE; private Function1<? super Long, Unit> onViewGuildScheduledEvents = WidgetChannelsListAdapter$onViewGuildScheduledEvents$1.INSTANCE;
private long selectedGuildId; private long selectedGuildId;
/* compiled from: WidgetChannelsListAdapter.kt */ /* compiled from: WidgetChannelsListAdapter.kt */
@ -1190,6 +1190,9 @@ public final class WidgetChannelsListAdapter extends MGRecyclerAdapterSimple<Cha
m.checkNotNullParameter(channelListItem, "data"); m.checkNotNullParameter(channelListItem, "data");
super.onConfigure(i, (int) channelListItem); super.onConfigure(i, (int) channelListItem);
ChannelListItemGuildScheduledEvents channelListItemGuildScheduledEvents = (ChannelListItemGuildScheduledEvents) channelListItem; ChannelListItemGuildScheduledEvents channelListItemGuildScheduledEvents = (ChannelListItemGuildScheduledEvents) channelListItem;
View view = this.itemView;
m.checkNotNullExpressionValue(view, "itemView");
Context context = view.getContext();
TextView textView = this.binding.b; TextView textView = this.binding.b;
m.checkNotNullExpressionValue(textView, "binding.channelsListItemGuildScheduledEventCount"); m.checkNotNullExpressionValue(textView, "binding.channelsListItemGuildScheduledEventCount");
textView.setVisibility(channelListItemGuildScheduledEvents.getData().isEmpty() ^ true ? 0 : 8); textView.setVisibility(channelListItemGuildScheduledEvents.getData().isEmpty() ^ true ? 0 : 8);
@ -1198,7 +1201,8 @@ public final class WidgetChannelsListAdapter extends MGRecyclerAdapterSimple<Cha
textView2.setText(String.valueOf(channelListItemGuildScheduledEvents.getData().size())); textView2.setText(String.valueOf(channelListItemGuildScheduledEvents.getData().size()));
ConstraintLayout constraintLayout = this.binding.a; ConstraintLayout constraintLayout = this.binding.a;
m.checkNotNullExpressionValue(constraintLayout, "binding.root"); m.checkNotNullExpressionValue(constraintLayout, "binding.root");
setBackground(constraintLayout, false, channelListItemGuildScheduledEvents.getChannel()); m.checkNotNullExpressionValue(context, "context");
ViewExtensions.setBackgroundAndKeepPadding(constraintLayout, ContextCompat.getDrawable(context, DrawableCompat.getThemedDrawableRes$default(context, (int) R.attr.drawable_overlay_channels, 0, 2, (Object) null)));
this.binding.a.setOnClickListener(new WidgetChannelsListAdapter$ItemGuildScheduledEvents$onConfigure$1(this, channelListItemGuildScheduledEvents)); this.binding.a.setOnClickListener(new WidgetChannelsListAdapter$ItemGuildScheduledEvents$onConfigure$1(this, channelListItemGuildScheduledEvents));
} }
} }
@ -1667,8 +1671,8 @@ public final class WidgetChannelsListAdapter extends MGRecyclerAdapterSimple<Cha
return this.onViewGuildRoleSubscriptions; return this.onViewGuildRoleSubscriptions;
} }
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1<? super com.discord.api.channel.Channel, kotlin.Unit>, kotlin.jvm.functions.Function1<com.discord.api.channel.Channel, kotlin.Unit> */ /* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1<? super java.lang.Long, kotlin.Unit>, kotlin.jvm.functions.Function1<java.lang.Long, kotlin.Unit> */
public final Function1<Channel, Unit> getOnViewGuildScheduledEvents() { public final Function1<Long, Unit> getOnViewGuildScheduledEvents() {
return this.onViewGuildScheduledEvents; return this.onViewGuildScheduledEvents;
} }
@ -1781,7 +1785,7 @@ public final class WidgetChannelsListAdapter extends MGRecyclerAdapterSimple<Cha
this.onViewGuildRoleSubscriptions = function0; this.onViewGuildRoleSubscriptions = function0;
} }
public final void setOnViewGuildScheduledEvents(Function1<? super Channel, Unit> function1) { public final void setOnViewGuildScheduledEvents(Function1<? super Long, Unit> function1) {
m.checkNotNullParameter(function1, "<set-?>"); m.checkNotNullParameter(function1, "<set-?>");
this.onViewGuildScheduledEvents = function1; this.onViewGuildScheduledEvents = function1;
} }

View file

@ -1,48 +1,46 @@
package com.discord.widgets.channels.list.items; package com.discord.widgets.channels.list.items;
import a0.a.a.b;
import c.d.b.a.a; import c.d.b.a.a;
import com.discord.api.channel.Channel;
import com.discord.api.guildscheduledevent.GuildScheduledEvent; import com.discord.api.guildscheduledevent.GuildScheduledEvent;
import d0.z.d.m; import d0.z.d.m;
import java.util.List; import java.util.List;
/* compiled from: ChannelListItemGuildScheduledEvents.kt */ /* compiled from: ChannelListItemGuildScheduledEvents.kt */
public final class ChannelListItemGuildScheduledEvents implements ChannelListItem { public final class ChannelListItemGuildScheduledEvents implements ChannelListItem {
private final Channel channel;
private final List<GuildScheduledEvent> data; private final List<GuildScheduledEvent> data;
private final long guildId;
private final String key = String.valueOf(getType()); private final String key = String.valueOf(getType());
private final int type = 19; private final int type = 19;
public ChannelListItemGuildScheduledEvents(List<GuildScheduledEvent> list, Channel channel) { public ChannelListItemGuildScheduledEvents(List<GuildScheduledEvent> list, long j) {
m.checkNotNullParameter(list, "data"); m.checkNotNullParameter(list, "data");
m.checkNotNullParameter(channel, "channel");
this.data = list; this.data = list;
this.channel = channel; this.guildId = j;
} }
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.widgets.channels.list.items.ChannelListItemGuildScheduledEvents */ /* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.widgets.channels.list.items.ChannelListItemGuildScheduledEvents */
/* JADX WARN: Multi-variable type inference failed */ /* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ ChannelListItemGuildScheduledEvents copy$default(ChannelListItemGuildScheduledEvents channelListItemGuildScheduledEvents, List list, Channel channel, int i, Object obj) { public static /* synthetic */ ChannelListItemGuildScheduledEvents copy$default(ChannelListItemGuildScheduledEvents channelListItemGuildScheduledEvents, List list, long j, int i, Object obj) {
if ((i & 1) != 0) { if ((i & 1) != 0) {
list = channelListItemGuildScheduledEvents.data; list = channelListItemGuildScheduledEvents.data;
} }
if ((i & 2) != 0) { if ((i & 2) != 0) {
channel = channelListItemGuildScheduledEvents.channel; j = channelListItemGuildScheduledEvents.guildId;
} }
return channelListItemGuildScheduledEvents.copy(list, channel); return channelListItemGuildScheduledEvents.copy(list, j);
} }
public final List<GuildScheduledEvent> component1() { public final List<GuildScheduledEvent> component1() {
return this.data; return this.data;
} }
public final Channel component2() { public final long component2() {
return this.channel; return this.guildId;
} }
public final ChannelListItemGuildScheduledEvents copy(List<GuildScheduledEvent> list, Channel channel) { public final ChannelListItemGuildScheduledEvents copy(List<GuildScheduledEvent> list, long j) {
m.checkNotNullParameter(list, "data"); m.checkNotNullParameter(list, "data");
m.checkNotNullParameter(channel, "channel"); return new ChannelListItemGuildScheduledEvents(list, j);
return new ChannelListItemGuildScheduledEvents(list, channel);
} }
public boolean equals(Object obj) { public boolean equals(Object obj) {
@ -53,17 +51,17 @@ public final class ChannelListItemGuildScheduledEvents implements ChannelListIte
return false; return false;
} }
ChannelListItemGuildScheduledEvents channelListItemGuildScheduledEvents = (ChannelListItemGuildScheduledEvents) obj; ChannelListItemGuildScheduledEvents channelListItemGuildScheduledEvents = (ChannelListItemGuildScheduledEvents) obj;
return m.areEqual(this.data, channelListItemGuildScheduledEvents.data) && m.areEqual(this.channel, channelListItemGuildScheduledEvents.channel); return m.areEqual(this.data, channelListItemGuildScheduledEvents.data) && this.guildId == channelListItemGuildScheduledEvents.guildId;
}
public final Channel getChannel() {
return this.channel;
} }
public final List<GuildScheduledEvent> getData() { public final List<GuildScheduledEvent> getData() {
return this.data; return this.data;
} }
public final long getGuildId() {
return this.guildId;
}
@Override // com.discord.widgets.channels.list.items.ChannelListItem, com.discord.utilities.mg_recycler.MGRecyclerDataPayload, com.discord.utilities.recycler.DiffKeyProvider @Override // com.discord.widgets.channels.list.items.ChannelListItem, com.discord.utilities.mg_recycler.MGRecyclerDataPayload, com.discord.utilities.recycler.DiffKeyProvider
public String getKey() { public String getKey() {
return this.key; return this.key;
@ -76,21 +74,13 @@ public final class ChannelListItemGuildScheduledEvents implements ChannelListIte
public int hashCode() { public int hashCode() {
List<GuildScheduledEvent> list = this.data; List<GuildScheduledEvent> list = this.data;
int i = 0; return b.a(this.guildId) + ((list != null ? list.hashCode() : 0) * 31);
int hashCode = (list != null ? list.hashCode() : 0) * 31;
Channel channel = this.channel;
if (channel != null) {
i = channel.hashCode();
}
return hashCode + i;
} }
public String toString() { public String toString() {
StringBuilder P = a.P("ChannelListItemGuildScheduledEvents(data="); StringBuilder P = a.P("ChannelListItemGuildScheduledEvents(data=");
P.append(this.data); P.append(this.data);
P.append(", channel="); P.append(", guildId=");
P.append(this.channel); return a.A(P, this.guildId, ")");
P.append(")");
return P.toString();
} }
} }

View file

@ -951,7 +951,7 @@ public final class WidgetChatListAdapterItemInvite extends WidgetChatListAdapter
m.throwUninitializedPropertyAccessException("item"); m.throwUninitializedPropertyAccessException("item");
} }
String eventId = inviteEntry2.getEventId(); String eventId = inviteEntry2.getEventId();
instantInvites.fetchInviteIfNotLoaded(inviteCode, eventId != null ? SnowflakeUtils.INSTANCE.toSnowflake(eventId) : null, "Invite Button Embed"); StoreInstantInvites.fetchInviteIfNotLoaded$default(instantInvites, inviteCode, eventId != null ? SnowflakeUtils.INSTANCE.toSnowflake(eventId) : null, "Invite Button Embed", null, 8, null);
ModelProvider modelProvider = ModelProvider.INSTANCE; ModelProvider modelProvider = ModelProvider.INSTANCE;
InviteEntry inviteEntry3 = this.item; InviteEntry inviteEntry3 = this.item;
if (inviteEntry3 == null) { if (inviteEntry3 == null) {

View file

@ -434,7 +434,7 @@ public final class WidgetChatListAdapterItemStageInvite extends WidgetChatListAd
if (stageInviteEntry == null) { if (stageInviteEntry == null) {
m.throwUninitializedPropertyAccessException("item"); m.throwUninitializedPropertyAccessException("item");
} }
StoreInstantInvites.fetchInviteIfNotLoaded$default(instantInvites, stageInviteEntry.getInviteCode(), null, "Invite Button Embed", 2, null); StoreInstantInvites.fetchInviteIfNotLoaded$default(instantInvites, stageInviteEntry.getInviteCode(), null, "Invite Button Embed", null, 10, null);
Model.Companion companion = Model.Companion; Model.Companion companion = Model.Companion;
StageInviteEntry stageInviteEntry2 = this.item; StageInviteEntry stageInviteEntry2 = this.item;
if (stageInviteEntry2 == null) { if (stageInviteEntry2 == null) {

View file

@ -1,30 +1,19 @@
package com.discord.widgets.contact_sync; package com.discord.widgets.contact_sync;
import com.discord.analytics.generated.events.network_action.TrackNetworkActionUserContactsSync;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.api.friendsuggestions.BulkFriendSuggestions; import com.discord.api.friendsuggestions.BulkFriendSuggestions;
import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetContactSyncViewModel.kt */ /* compiled from: WidgetContactSyncViewModel.kt */
public final class WidgetContactSyncViewModel$onContactsFetched$1 extends o implements Function1<BulkFriendSuggestions, Unit> { public final class WidgetContactSyncViewModel$onContactsFetched$1 extends o implements Function1<BulkFriendSuggestions, TrackNetworkMetadataReceiver> {
public final /* synthetic */ WidgetContactSyncViewModel this$0; public static final WidgetContactSyncViewModel$onContactsFetched$1 INSTANCE = new WidgetContactSyncViewModel$onContactsFetched$1();
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ public WidgetContactSyncViewModel$onContactsFetched$1() {
public WidgetContactSyncViewModel$onContactsFetched$1(WidgetContactSyncViewModel widgetContactSyncViewModel) {
super(1); super(1);
this.this$0 = widgetContactSyncViewModel;
} }
/* Return type fixed from 'java.lang.Object' to match base method */ public final TrackNetworkMetadataReceiver invoke(BulkFriendSuggestions bulkFriendSuggestions) {
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ return new TrackNetworkActionUserContactsSync();
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(BulkFriendSuggestions bulkFriendSuggestions) {
invoke(bulkFriendSuggestions);
return Unit.a;
}
public final void invoke(BulkFriendSuggestions bulkFriendSuggestions) {
m.checkNotNullParameter(bulkFriendSuggestions, "it");
WidgetContactSyncViewModel.access$handleFriendSuggestions(this.this$0, bulkFriendSuggestions);
} }
} }

View file

@ -1,12 +1,12 @@
package com.discord.widgets.contact_sync; package com.discord.widgets.contact_sync;
import com.discord.utilities.error.Error; import com.discord.api.friendsuggestions.BulkFriendSuggestions;
import d0.z.d.m; import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: WidgetContactSyncViewModel.kt */ /* compiled from: WidgetContactSyncViewModel.kt */
public final class WidgetContactSyncViewModel$onContactsFetched$2 extends o implements Function1<Error, Unit> { public final class WidgetContactSyncViewModel$onContactsFetched$2 extends o implements Function1<BulkFriendSuggestions, Unit> {
public final /* synthetic */ WidgetContactSyncViewModel this$0; public final /* synthetic */ WidgetContactSyncViewModel this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -18,13 +18,13 @@ public final class WidgetContactSyncViewModel$onContactsFetched$2 extends o impl
/* Return type fixed from 'java.lang.Object' to match base method */ /* 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] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1 @Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Error error) { public /* bridge */ /* synthetic */ Unit invoke(BulkFriendSuggestions bulkFriendSuggestions) {
invoke(error); invoke(bulkFriendSuggestions);
return Unit.a; return Unit.a;
} }
public final void invoke(Error error) { public final void invoke(BulkFriendSuggestions bulkFriendSuggestions) {
m.checkNotNullParameter(error, "it"); m.checkNotNullParameter(bulkFriendSuggestions, "it");
WidgetContactSyncViewModel.access$handleUploadError(this.this$0, error); WidgetContactSyncViewModel.access$handleFriendSuggestions(this.this$0, bulkFriendSuggestions);
} }
} }

View file

@ -0,0 +1,30 @@
package com.discord.widgets.contact_sync;
import com.discord.utilities.error.Error;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetContactSyncViewModel.kt */
public final class WidgetContactSyncViewModel$onContactsFetched$3 extends o implements Function1<Error, Unit> {
public final /* synthetic */ WidgetContactSyncViewModel this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetContactSyncViewModel$onContactsFetched$3(WidgetContactSyncViewModel widgetContactSyncViewModel) {
super(1);
this.this$0 = widgetContactSyncViewModel;
}
/* 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(Error error) {
invoke(error);
return Unit.a;
}
public final void invoke(Error error) {
m.checkNotNullParameter(error, "it");
WidgetContactSyncViewModel.access$handleUploadError(this.this$0, error);
}
}

View file

@ -1240,7 +1240,7 @@ public final class WidgetContactSyncViewModel extends AppViewModel<ViewState> {
} }
RestAPIParams.UploadContacts uploadContacts = new RestAPIParams.UploadContacts(arrayList, false, AllowedInSuggestionsType.ANYONE_WITH_CONTACT_INFO); RestAPIParams.UploadContacts uploadContacts = new RestAPIParams.UploadContacts(arrayList, false, AllowedInSuggestionsType.ANYONE_WITH_CONTACT_INFO);
StoreStream.Companion.getContactSync().setContactSyncUploadTimestamp(ClockFactory.get().currentTimeMillis()); StoreStream.Companion.getContactSync().setContactSyncUploadTimestamp(ClockFactory.get().currentTimeMillis());
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(this.restAPI.uploadContacts(uploadContacts), false, 1, null), this, null, 2, null), WidgetContactSyncViewModel.class, (Context) null, (Function1) null, new WidgetContactSyncViewModel$onContactsFetched$2(this), (Function0) null, (Function0) null, new WidgetContactSyncViewModel$onContactsFetched$1(this), 54, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestCallStateKt.logNetworkAction(this.restAPI.uploadContacts(uploadContacts), WidgetContactSyncViewModel$onContactsFetched$1.INSTANCE), false, 1, null), this, null, 2, null), WidgetContactSyncViewModel.class, (Context) null, (Function1) null, new WidgetContactSyncViewModel$onContactsFetched$3(this), (Function0) null, (Function0) null, new WidgetContactSyncViewModel$onContactsFetched$2(this), 54, (Object) null);
} }
} }

View file

@ -0,0 +1,21 @@
package com.discord.widgets.guilds.create;
import com.discord.analytics.generated.events.network_action.TrackNetworkActionGuildCreate;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.api.guild.Guild;
import d0.z.d.o;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetGuildCreateViewModel.kt */
public final class WidgetGuildCreateViewModel$createGuild$createGuildRequestObservable$1 extends o implements Function1<Guild, TrackNetworkMetadataReceiver> {
public final /* synthetic */ WidgetGuildCreateViewModel this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetGuildCreateViewModel$createGuild$createGuildRequestObservable$1(WidgetGuildCreateViewModel widgetGuildCreateViewModel) {
super(1);
this.this$0 = widgetGuildCreateViewModel;
}
public final TrackNetworkMetadataReceiver invoke(Guild guild) {
return new TrackNetworkActionGuildCreate(WidgetGuildCreateViewModel.access$getStockGuildTemplate$p(this.this$0).name(), null);
}
}

View file

@ -15,6 +15,7 @@ import com.discord.stores.StoreGuildSelected;
import com.discord.stores.StoreGuildTemplates; import com.discord.stores.StoreGuildTemplates;
import com.discord.stores.StoreStream; import com.discord.stores.StoreStream;
import com.discord.stores.StoreUser; import com.discord.stores.StoreUser;
import com.discord.stores.utilities.RestCallStateKt;
import com.discord.utilities.analytics.AnalyticsTracker; import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.rest.RestAPI; import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt; import com.discord.utilities.rx.ObservableExtensionsKt;
@ -588,6 +589,10 @@ public final class WidgetGuildCreateViewModel extends AppViewModel<ViewState> {
} }
} }
public static final /* synthetic */ StockGuildTemplate access$getStockGuildTemplate$p(WidgetGuildCreateViewModel widgetGuildCreateViewModel) {
return widgetGuildCreateViewModel.stockGuildTemplate;
}
public static final /* synthetic */ void access$handleGuildCreateFailure(WidgetGuildCreateViewModel widgetGuildCreateViewModel) { public static final /* synthetic */ void access$handleGuildCreateFailure(WidgetGuildCreateViewModel widgetGuildCreateViewModel) {
widgetGuildCreateViewModel.handleGuildCreateFailure(); widgetGuildCreateViewModel.handleGuildCreateFailure();
} }
@ -645,7 +650,7 @@ public final class WidgetGuildCreateViewModel extends AppViewModel<ViewState> {
StockGuildTemplate stockGuildTemplate = this.stockGuildTemplate; StockGuildTemplate stockGuildTemplate = this.stockGuildTemplate;
Resources resources = context.getResources(); Resources resources = context.getResources();
m.checkNotNullExpressionValue(resources, "context.resources"); m.checkNotNullExpressionValue(resources, "context.resources");
observable = restAPI.createGuild(new RestAPIParams.CreateGuild(guildName, guildIconUri, stockGuildTemplate.getChannels(resources), Long.valueOf(this.stockGuildTemplate.getSystemChannelId()))); observable = RestCallStateKt.logNetworkAction(restAPI.createGuild(new RestAPIParams.CreateGuild(guildName, guildIconUri, stockGuildTemplate.getChannels(resources), Long.valueOf(this.stockGuildTemplate.getSystemChannelId()))), new WidgetGuildCreateViewModel$createGuild$createGuildRequestObservable$1(this));
} }
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn(observable, false), this, null, 2, null), WidgetGuildCreateViewModel.class, (Context) null, (Function1) null, new WidgetGuildCreateViewModel$createGuild$2(this), (Function0) null, (Function0) null, new WidgetGuildCreateViewModel$createGuild$1(this), 54, (Object) null); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn(observable, false), this, null, 2, null), WidgetGuildCreateViewModel.class, (Context) null, (Function1) null, new WidgetGuildCreateViewModel$createGuild$2(this), (Function0) null, (Function0) null, new WidgetGuildCreateViewModel$createGuild$1(this), 54, (Object) null);
updateViewState(ViewState.Initialized.copy$default(initialized, null, 0, null, null, null, true, null, 95, null)); updateViewState(ViewState.Initialized.copy$default(initialized, null, 0, null, null, null, true, null, 95, null));

View file

@ -127,7 +127,7 @@ public final class WidgetGuildInvite extends AppFragment {
return new j0.l.e.j(null); return new j0.l.e.j(null);
} }
StoreStream.Companion companion = StoreStream.Companion; StoreStream.Companion companion = StoreStream.Companion;
companion.getInstantInvites().fetchInviteIfNotLoaded(inviteCode.getInviteCode(), inviteCode.getEventId(), inviteCode.getSource()); companion.getInstantInvites().fetchInviteIfNotLoaded(inviteCode.getInviteCode(), inviteCode.getEventId(), inviteCode.getSource(), Boolean.valueOf(this.inviteResolved));
return companion.getInstantInvites().observeInvite(ModelInvite.getInviteStoreKey(inviteCode.getInviteCode(), inviteCode.getEventId())).x(WidgetGuildInvite$getResolvedInviteOrDefault$1.INSTANCE); return companion.getInstantInvites().observeInvite(ModelInvite.getInviteStoreKey(inviteCode.getInviteCode(), inviteCode.getEventId())).x(WidgetGuildInvite$getResolvedInviteOrDefault$1.INSTANCE);
} }

View file

@ -4,7 +4,6 @@ import android.content.Context;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import c.a.k.b;
import c.d.b.a.a; import c.d.b.a.a;
import com.discord.R; import com.discord.R;
import com.discord.api.guildscheduledevent.GuildScheduledEvent; import com.discord.api.guildscheduledevent.GuildScheduledEvent;
@ -139,7 +138,8 @@ public final class GuildEventPromptListView extends LinearLayout {
public final void configure(ScheduledEventData scheduledEventData, Function0<Unit> function0, Function0<Unit> function02) { public final void configure(ScheduledEventData scheduledEventData, Function0<Unit> function0, Function0<Unit> function02) {
GuildEventPromptView guildEventPromptView = this.binding.d; GuildEventPromptView guildEventPromptView = this.binding.d;
int i = 8; boolean z2 = true;
int i = 0;
guildEventPromptView.setVisibility(function02 != null ? 0 : 8); guildEventPromptView.setVisibility(function02 != null ? 0 : 8);
String string = guildEventPromptView.getContext().getString(R.string.stage_channel_start_title); String string = guildEventPromptView.getContext().getString(R.string.stage_channel_start_title);
m.checkNotNullExpressionValue(string, "context.getString(R.stri…tage_channel_start_title)"); m.checkNotNullExpressionValue(string, "context.getString(R.stri…tage_channel_start_title)");
@ -156,8 +156,11 @@ public final class GuildEventPromptListView extends LinearLayout {
guildEventPromptView2.configure(R.drawable.ic_event_20dp, R.color.brand_new_500, string3, string4); guildEventPromptView2.configure(R.drawable.ic_event_20dp, R.color.brand_new_500, string3, string4);
guildEventPromptView2.setOnClickListener(new GuildEventPromptListView$configure$$inlined$apply$lambda$2(function0)); guildEventPromptView2.setOnClickListener(new GuildEventPromptListView$configure$$inlined$apply$lambda$2(function0));
GuildEventPromptView guildEventPromptView3 = this.binding.f1631c; GuildEventPromptView guildEventPromptView3 = this.binding.f1631c;
if (scheduledEventData != null) { if (scheduledEventData == null) {
i = 0; z2 = false;
}
if (!z2) {
i = 8;
} }
guildEventPromptView3.setVisibility(i); guildEventPromptView3.setVisibility(i);
if (scheduledEventData != null) { if (scheduledEventData != null) {
@ -165,9 +168,7 @@ public final class GuildEventPromptListView extends LinearLayout {
String h = guildScheduledEvent.h(); String h = guildScheduledEvent.h();
Context context = guildEventPromptView3.getContext(); Context context = guildEventPromptView3.getContext();
m.checkNotNullExpressionValue(context, "context"); m.checkNotNullExpressionValue(context, "context");
Context context2 = guildEventPromptView3.getContext(); guildEventPromptView3.configure(R.drawable.ic_event_20dp, R.color.status_green_600, h, GuildScheduledEventUtilitiesKt.getEventStartingTimeString(guildScheduledEvent, context));
m.checkNotNullExpressionValue(context2, "context");
guildEventPromptView3.configure(R.drawable.ic_event_20dp, R.color.status_green_600, h, b.h(context, R.string.guild_event_start_prompt_description, new Object[]{GuildScheduledEventUtilitiesKt.getEventStartingTimeString(guildScheduledEvent, context2)}, null, 4));
guildEventPromptView3.setOnClickListener(new GuildEventPromptListView$configure$$inlined$apply$lambda$3(scheduledEventData)); guildEventPromptView3.setOnClickListener(new GuildEventPromptListView$configure$$inlined$apply$lambda$3(scheduledEventData));
} }
} }

View file

@ -0,0 +1,18 @@
package com.discord.widgets.guildscheduledevent;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
/* compiled from: GuildScheduledEventBottomButtonView.kt */
public final class GuildScheduledEventBottomButtonView$configure$5 extends o implements Function0<Unit> {
public static final GuildScheduledEventBottomButtonView$configure$5 INSTANCE = new GuildScheduledEventBottomButtonView$configure$5();
public GuildScheduledEventBottomButtonView$configure$5() {
super(0);
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
}
}

View file

@ -6,20 +6,24 @@ import kotlin.jvm.functions.Function0;
/* compiled from: GuildScheduledEventBottomButtonView.kt */ /* compiled from: GuildScheduledEventBottomButtonView.kt */
public final class GuildScheduledEventBottomButtonView$configureInterestedButton$$inlined$apply$lambda$1 implements View.OnClickListener { public final class GuildScheduledEventBottomButtonView$configureInterestedButton$$inlined$apply$lambda$1 implements View.OnClickListener {
public final /* synthetic */ boolean $isRsvped$inlined; public final /* synthetic */ boolean $isRsvped$inlined;
public final /* synthetic */ Function0 $onEndEventButtonClicked$inlined;
public final /* synthetic */ Function0 $onJoinButtonClicked$inlined; public final /* synthetic */ Function0 $onJoinButtonClicked$inlined;
public final /* synthetic */ Function0 $onRsvpButtonClicked$inlined; public final /* synthetic */ Function0 $onRsvpButtonClicked$inlined;
public final /* synthetic */ GuildScheduledEventBottomButtonView.VisibilityInfo $visibilityInfo$inlined; public final /* synthetic */ GuildScheduledEventBottomButtonView.VisibilityInfo $visibilityInfo$inlined;
public GuildScheduledEventBottomButtonView$configureInterestedButton$$inlined$apply$lambda$1(GuildScheduledEventBottomButtonView.VisibilityInfo visibilityInfo, boolean z2, Function0 function0, Function0 function02) { public GuildScheduledEventBottomButtonView$configureInterestedButton$$inlined$apply$lambda$1(GuildScheduledEventBottomButtonView.VisibilityInfo visibilityInfo, boolean z2, Function0 function0, Function0 function02, Function0 function03) {
this.$visibilityInfo$inlined = visibilityInfo; this.$visibilityInfo$inlined = visibilityInfo;
this.$isRsvped$inlined = z2; this.$isRsvped$inlined = z2;
this.$onJoinButtonClicked$inlined = function0; this.$onEndEventButtonClicked$inlined = function0;
this.$onRsvpButtonClicked$inlined = function02; this.$onJoinButtonClicked$inlined = function02;
this.$onRsvpButtonClicked$inlined = function03;
} }
@Override // android.view.View.OnClickListener @Override // android.view.View.OnClickListener
public final void onClick(View view) { public final void onClick(View view) {
if (this.$visibilityInfo$inlined.isEventActive()) { if (this.$visibilityInfo$inlined.isEventEndable()) {
this.$onEndEventButtonClicked$inlined.mo1invoke();
} else if (this.$visibilityInfo$inlined.isEventActive()) {
this.$onJoinButtonClicked$inlined.mo1invoke(); this.$onJoinButtonClicked$inlined.mo1invoke();
} else { } else {
this.$onRsvpButtonClicked$inlined.mo1invoke(); this.$onRsvpButtonClicked$inlined.mo1invoke();

View file

@ -10,6 +10,7 @@ import c.a.k.b;
import c.d.b.a.a; import c.d.b.a.a;
import com.discord.R; import com.discord.R;
import com.discord.api.guildscheduledevent.GuildScheduledEvent; import com.discord.api.guildscheduledevent.GuildScheduledEvent;
import com.discord.api.guildscheduledevent.GuildScheduledEventEntityType;
import com.discord.api.guildscheduledevent.GuildScheduledEventStatus; import com.discord.api.guildscheduledevent.GuildScheduledEventStatus;
import com.discord.databinding.GuildScheduledEventBottomButtonViewBinding; import com.discord.databinding.GuildScheduledEventBottomButtonViewBinding;
import com.discord.utilities.color.ColorCompat; import com.discord.utilities.color.ColorCompat;
@ -32,6 +33,7 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
private final boolean isAnyButtonVisible; private final boolean isAnyButtonVisible;
private final boolean isEventActive; private final boolean isEventActive;
private final boolean isEventComplete; private final boolean isEventComplete;
private final boolean isEventEndable;
private final boolean isShareVisible; private final boolean isShareVisible;
private final boolean isStartEventVisible; private final boolean isStartEventVisible;
private final boolean primaryInteractionButtonVisible; private final boolean primaryInteractionButtonVisible;
@ -49,12 +51,14 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
boolean z6 = guildScheduledEvent.k() == GuildScheduledEventStatus.COMPLETED; boolean z6 = guildScheduledEvent.k() == GuildScheduledEventStatus.COMPLETED;
this.isEventComplete = z6; this.isEventComplete = z6;
this.primaryInteractionButtonVisible = z2; this.primaryInteractionButtonVisible = z2;
boolean isStartable = !z4 ? false : eventTiming.isStartable(); boolean isStartable = (!z4 || z6) ? false : eventTiming.isStartable();
this.isStartEventVisible = isStartable; this.isStartEventVisible = isStartable;
this.isEventActive = eventTiming == GuildScheduledEventTiming.LIVE; boolean z7 = eventTiming == GuildScheduledEventTiming.LIVE;
boolean z7 = z3 && !z6; this.isEventActive = z7;
this.isShareVisible = z7; this.isEventEndable = z7 && guildScheduledEvent.e() == GuildScheduledEventEntityType.EXTERNAL;
if (!z2 && !isStartable && !z7) { boolean z8 = z3 && !z6;
this.isShareVisible = z8;
if (!z2 && !isStartable && !z8) {
z5 = false; z5 = false;
} }
this.isAnyButtonVisible = z5; this.isAnyButtonVisible = z5;
@ -171,6 +175,10 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
return this.isEventComplete; return this.isEventComplete;
} }
public final boolean isEventEndable() {
return this.isEventEndable;
}
public final boolean isShareVisible() { public final boolean isShareVisible() {
return this.isShareVisible; return this.isShareVisible;
} }
@ -220,7 +228,7 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
this.binding = a; this.binding = a;
} }
public static /* synthetic */ void configure$default(GuildScheduledEventBottomButtonView guildScheduledEventBottomButtonView, GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, Function0 function0, Function0 function02, Function0 function03, Function0 function04, int i, Object obj) { public static /* synthetic */ void configure$default(GuildScheduledEventBottomButtonView guildScheduledEventBottomButtonView, GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, Function0 function0, Function0 function02, Function0 function03, Function0 function04, Function0 function05, int i, Object obj) {
boolean z6 = false; boolean z6 = false;
boolean z7 = (i & 2) != 0 ? false : z2; boolean z7 = (i & 2) != 0 ? false : z2;
boolean z8 = (i & 4) != 0 ? false : z3; boolean z8 = (i & 4) != 0 ? false : z3;
@ -228,29 +236,38 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
if ((i & 16) == 0) { if ((i & 16) == 0) {
z6 = z5; z6 = z5;
} }
guildScheduledEventBottomButtonView.configure(guildScheduledEvent, z7, z8, z9, z6, (i & 32) != 0 ? GuildScheduledEventBottomButtonView$configure$1.INSTANCE : function0, (i & 64) != 0 ? GuildScheduledEventBottomButtonView$configure$2.INSTANCE : function02, (i & 128) != 0 ? GuildScheduledEventBottomButtonView$configure$3.INSTANCE : function03, (i & 256) != 0 ? GuildScheduledEventBottomButtonView$configure$4.INSTANCE : function04); guildScheduledEventBottomButtonView.configure(guildScheduledEvent, z7, z8, z9, z6, (i & 32) != 0 ? GuildScheduledEventBottomButtonView$configure$1.INSTANCE : function0, (i & 64) != 0 ? GuildScheduledEventBottomButtonView$configure$2.INSTANCE : function02, (i & 128) != 0 ? GuildScheduledEventBottomButtonView$configure$3.INSTANCE : function03, (i & 256) != 0 ? GuildScheduledEventBottomButtonView$configure$4.INSTANCE : function04, (i & 512) != 0 ? GuildScheduledEventBottomButtonView$configure$5.INSTANCE : function05);
} }
private final void configureInterestedButton(VisibilityInfo visibilityInfo, boolean z2, Function0<Unit> function0, Function0<Unit> function02) { private final void configureInterestedButton(VisibilityInfo visibilityInfo, boolean z2, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03) {
ImageView imageView = this.binding.f1633c; ImageView imageView = this.binding.f1633c;
int i = 8; int i = 8;
imageView.setVisibility(visibilityInfo.getPrimaryInteractionButtonVisible() ? 0 : 8); imageView.setVisibility(visibilityInfo.getPrimaryInteractionButtonVisible() ? 0 : 8);
imageView.setImageResource(visibilityInfo.isEventActive() ? R.drawable.bg_guild_scheduled_event_list_item_interested_button_active : z2 ? R.drawable.bg_guild_scheduled_event_list_item_interested_button_interested : R.drawable.bg_guild_scheduled_event_list_item_interested_button_default); boolean isEventEndable = visibilityInfo.isEventEndable();
imageView.setOnClickListener(new GuildScheduledEventBottomButtonView$configureInterestedButton$$inlined$apply$lambda$1(visibilityInfo, z2, function02, function0)); int i2 = R.drawable.bg_guild_scheduled_event_list_item_interested_button_default;
if (!isEventEndable && !visibilityInfo.isEventComplete()) {
if (visibilityInfo.isEventActive()) {
i2 = R.drawable.bg_guild_scheduled_event_list_item_interested_button_active;
} else if (z2) {
i2 = R.drawable.bg_guild_scheduled_event_list_item_interested_button_interested;
}
}
imageView.setImageResource(i2);
imageView.setOnClickListener(new GuildScheduledEventBottomButtonView$configureInterestedButton$$inlined$apply$lambda$1(visibilityInfo, z2, function03, function02, function0));
imageView.setEnabled(!visibilityInfo.isEventComplete()); imageView.setEnabled(!visibilityInfo.isEventComplete());
TextView textView = this.binding.d; TextView textView = this.binding.d;
if (visibilityInfo.getPrimaryInteractionButtonVisible()) { if (visibilityInfo.getPrimaryInteractionButtonVisible()) {
i = 0; i = 0;
} }
textView.setVisibility(i); textView.setVisibility(i);
int color = (!z2 || visibilityInfo.isEventActive() || visibilityInfo.isEventComplete()) ? visibilityInfo.isEventComplete() ? ColorCompat.getColor(textView.getContext(), (int) R.color.white_alpha_40) : ColorCompat.getColor(textView.getContext(), (int) R.color.white) : ColorCompat.getThemedColor(textView.getContext(), (int) R.attr.colorControlBrandForegroundNew); int color = (!z2 || visibilityInfo.isEventActive() || visibilityInfo.isEventComplete() || visibilityInfo.isEventEndable()) ? visibilityInfo.isEventComplete() ? ColorCompat.getColor(textView.getContext(), (int) R.color.white_alpha_40) : ColorCompat.getColor(textView.getContext(), (int) R.color.white) : ColorCompat.getThemedColor(textView.getContext(), (int) R.attr.colorControlBrandForegroundNew);
int i2 = (visibilityInfo.isEventActive() || visibilityInfo.isEventComplete()) ? 0 : z2 ? R.drawable.ic_check_brand_16dp : R.drawable.ic_bell_16dp; int i3 = (visibilityInfo.isEventActive() || visibilityInfo.isEventEndable() || visibilityInfo.isEventComplete()) ? 0 : z2 ? R.drawable.ic_check_brand_16dp : R.drawable.ic_bell_16dp;
int i3 = visibilityInfo.isEventActive() ? R.string.stage_channel_join_button : visibilityInfo.isEventComplete() ? R.string.guild_event_invite_completed : R.string.stage_instance_interested_label; int i4 = visibilityInfo.isEventEndable() ? R.string.end_event : visibilityInfo.isEventActive() ? R.string.stage_channel_join_button : visibilityInfo.isEventComplete() ? R.string.guild_event_invite_completed : R.string.stage_instance_interested_label;
DrawableCompat.setCompoundDrawablesCompat$default(textView, i2, 0, 0, 0, 14, (Object) null); DrawableCompat.setCompoundDrawablesCompat$default(textView, i3, 0, 0, 0, 14, (Object) null);
textView.setTextColor(color); textView.setTextColor(color);
Context context = textView.getContext(); Context context = textView.getContext();
m.checkNotNullExpressionValue(context, "context"); m.checkNotNullExpressionValue(context, "context");
textView.setText(b.h(context, i3, new Object[0], null, 4)); textView.setText(b.h(context, i4, new Object[0], null, 4));
} }
private final void configureShareButton(VisibilityInfo visibilityInfo, Function0<Unit> function0) { private final void configureShareButton(VisibilityInfo visibilityInfo, Function0<Unit> function0) {
@ -273,24 +290,26 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
imageView.setOnClickListener(new GuildScheduledEventBottomButtonView$configureStartEventButton$$inlined$apply$lambda$1(visibilityInfo, function0)); imageView.setOnClickListener(new GuildScheduledEventBottomButtonView$configureStartEventButton$$inlined$apply$lambda$1(visibilityInfo, function0));
} }
public final void configure(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03, Function0<Unit> function04) { public final void configure(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03, Function0<Unit> function04, Function0<Unit> function05) {
m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent"); m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent");
m.checkNotNullParameter(function0, "onRsvpButtonClicked"); m.checkNotNullParameter(function0, "onRsvpButtonClicked");
m.checkNotNullParameter(function02, "onStartEventButtonClicked"); m.checkNotNullParameter(function02, "onStartEventButtonClicked");
m.checkNotNullParameter(function03, "onShareButtonClicked"); m.checkNotNullParameter(function03, "onShareButtonClicked");
m.checkNotNullParameter(function04, "onJoinButtonClicked"); m.checkNotNullParameter(function04, "onJoinButtonClicked");
m.checkNotNullParameter(function05, "onEndEventButtonClicked");
VisibilityInfo visibilityInfo = new VisibilityInfo(guildScheduledEvent, z3, z4, z5); VisibilityInfo visibilityInfo = new VisibilityInfo(guildScheduledEvent, z3, z4, z5);
configureStartEventButton(visibilityInfo, function02); configureStartEventButton(visibilityInfo, function02);
configureInterestedButton(visibilityInfo, z2, function0, function04); configureInterestedButton(visibilityInfo, z2, function0, function04, function05);
configureShareButton(visibilityInfo, function03); configureShareButton(visibilityInfo, function03);
} }
public final void configureForDetails(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03, Function0<Unit> function04, Function0<Unit> function05) { public final void configureForDetails(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03, Function0<Unit> function04, Function0<Unit> function05, Function0<Unit> function06) {
m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent"); m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent");
m.checkNotNullParameter(function0, "onStartEventButtonClicked"); m.checkNotNullParameter(function0, "onStartEventButtonClicked");
m.checkNotNullParameter(function02, "onRsvpButtonClicked"); m.checkNotNullParameter(function02, "onRsvpButtonClicked");
m.checkNotNullParameter(function03, "onShareButtonClicked"); m.checkNotNullParameter(function03, "onShareButtonClicked");
m.checkNotNullParameter(function05, "onJoinButtonClicked"); m.checkNotNullParameter(function05, "onJoinButtonClicked");
m.checkNotNullParameter(function06, "onEndEventButtonClicked");
boolean z6 = true; boolean z6 = true;
VisibilityInfo visibilityInfo = new VisibilityInfo(guildScheduledEvent, true, z3, z4); VisibilityInfo visibilityInfo = new VisibilityInfo(guildScheduledEvent, true, z3, z4);
configureStartEventButton(visibilityInfo, function0); configureStartEventButton(visibilityInfo, function0);
@ -303,7 +322,7 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
m.checkNotNullExpressionValue(textView, "binding.interestedButtonText"); m.checkNotNullExpressionValue(textView, "binding.interestedButtonText");
textView.setVisibility(8); textView.setVisibility(8);
} else { } else {
configureInterestedButton(visibilityInfo, z2, function02, function05); configureInterestedButton(visibilityInfo, z2, function02, function05, function06);
} }
configureShareButton(visibilityInfo, function03); configureShareButton(visibilityInfo, function03);
ImageView imageView2 = this.binding.b; ImageView imageView2 = this.binding.b;

View file

@ -1,17 +1,18 @@
package com.discord.widgets.guildscheduledevent; package com.discord.widgets.guildscheduledevent;
import android.view.View; import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function0;
/* compiled from: GuildScheduledEventItemView.kt */ /* compiled from: GuildScheduledEventItemView.kt */
public final class GuildScheduledEventItemView$configureInternal$5 implements View.OnClickListener { public final class GuildScheduledEventItemView$configureInternal$5 extends o implements Function0<Unit> {
public final /* synthetic */ Function0 $onCardClicked; public static final GuildScheduledEventItemView$configureInternal$5 INSTANCE = new GuildScheduledEventItemView$configureInternal$5();
public GuildScheduledEventItemView$configureInternal$5(Function0 function0) { public GuildScheduledEventItemView$configureInternal$5() {
this.$onCardClicked = function0; super(0);
} }
@Override // android.view.View.OnClickListener @Override // kotlin.jvm.functions.Function0
public final void onClick(View view) { /* renamed from: invoke */
this.$onCardClicked.mo1invoke(); public final void mo1invoke() {
} }
} }

View file

@ -0,0 +1,17 @@
package com.discord.widgets.guildscheduledevent;
import android.view.View;
import kotlin.jvm.functions.Function0;
/* compiled from: GuildScheduledEventItemView.kt */
public final class GuildScheduledEventItemView$configureInternal$6 implements View.OnClickListener {
public final /* synthetic */ Function0 $onCardClicked;
public GuildScheduledEventItemView$configureInternal$6(Function0 function0) {
this.$onCardClicked = function0;
}
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
this.$onCardClicked.mo1invoke();
}
}

View file

@ -131,11 +131,11 @@ public final class GuildScheduledEventItemView extends ConstraintLayout {
guildScheduledEventItemView.configureInChatList(guildScheduledEvent, channel, guild, z2, z3, function0, (i & 64) != 0 ? GuildScheduledEventItemView$configureInChatList$1.INSTANCE : function02, (i & 128) != 0 ? GuildScheduledEventItemView$configureInChatList$2.INSTANCE : function03, function04); guildScheduledEventItemView.configureInChatList(guildScheduledEvent, channel, guild, z2, z3, function0, (i & 64) != 0 ? GuildScheduledEventItemView$configureInChatList$1.INSTANCE : function02, (i & 128) != 0 ? GuildScheduledEventItemView$configureInChatList$2.INSTANCE : function03, function04);
} }
private final void configureInternal(GuildScheduledEvent guildScheduledEvent, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03, Function0<Unit> function04, Function0<Unit> function05) { private final void configureInternal(GuildScheduledEvent guildScheduledEvent, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03, Function0<Unit> function04, Function0<Unit> function05, Function0<Unit> function06) {
GuildScheduledEventBottomButtonView guildScheduledEventBottomButtonView = this.binding.b; GuildScheduledEventBottomButtonView guildScheduledEventBottomButtonView = this.binding.b;
m.checkNotNullExpressionValue(guildScheduledEventBottomButtonView, "binding.guildScheduledEventListItemButtomView"); m.checkNotNullExpressionValue(guildScheduledEventBottomButtonView, "binding.guildScheduledEventListItemButtomView");
guildScheduledEventBottomButtonView.setVisibility(new GuildScheduledEventBottomButtonView.VisibilityInfo(guildScheduledEvent, z3, z5, z4).isAnyButtonVisible() ? 0 : 8); guildScheduledEventBottomButtonView.setVisibility(new GuildScheduledEventBottomButtonView.VisibilityInfo(guildScheduledEvent, z3, z5, z4).isAnyButtonVisible() ? 0 : 8);
this.binding.b.configure(guildScheduledEvent, z2, z3, z5, z4, function02, function03, function04, function05); this.binding.b.configure(guildScheduledEvent, z2, z3, z5, z4, function02, function03, function04, function05, function06);
TextView textView = this.binding.j; TextView textView = this.binding.j;
m.checkNotNullExpressionValue(textView, "binding.guildScheduledEventListItemRsvpText"); m.checkNotNullExpressionValue(textView, "binding.guildScheduledEventListItemRsvpText");
Integer l = guildScheduledEvent.l(); Integer l = guildScheduledEvent.l();
@ -147,12 +147,12 @@ public final class GuildScheduledEventItemView extends ConstraintLayout {
configureDescription(guildScheduledEvent.c()); configureDescription(guildScheduledEvent.c());
configureLocation(guildScheduledEventLocationInfo, guild); configureLocation(guildScheduledEventLocationInfo, guild);
if (function0 != null) { if (function0 != null) {
this.binding.a.setOnClickListener(new GuildScheduledEventItemView$configureInternal$5(function0)); this.binding.a.setOnClickListener(new GuildScheduledEventItemView$configureInternal$6(function0));
} }
} }
public static /* synthetic */ void configureInternal$default(GuildScheduledEventItemView guildScheduledEventItemView, GuildScheduledEvent guildScheduledEvent, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5, Function0 function0, Function0 function02, Function0 function03, Function0 function04, Function0 function05, int i, Object obj) { public static /* synthetic */ void configureInternal$default(GuildScheduledEventItemView guildScheduledEventItemView, GuildScheduledEvent guildScheduledEvent, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5, Function0 function0, Function0 function02, Function0 function03, Function0 function04, Function0 function05, Function0 function06, int i, Object obj) {
guildScheduledEventItemView.configureInternal(guildScheduledEvent, guildScheduledEventLocationInfo, guild, z2, z3, z4, z5, function0, (i & 256) != 0 ? GuildScheduledEventItemView$configureInternal$1.INSTANCE : function02, (i & 512) != 0 ? GuildScheduledEventItemView$configureInternal$2.INSTANCE : function03, (i & 1024) != 0 ? GuildScheduledEventItemView$configureInternal$3.INSTANCE : function04, (i & 2048) != 0 ? GuildScheduledEventItemView$configureInternal$4.INSTANCE : function05); guildScheduledEventItemView.configureInternal(guildScheduledEvent, guildScheduledEventLocationInfo, guild, z2, z3, z4, z5, function0, (i & 256) != 0 ? GuildScheduledEventItemView$configureInternal$1.INSTANCE : function02, (i & 512) != 0 ? GuildScheduledEventItemView$configureInternal$2.INSTANCE : function03, (i & 1024) != 0 ? GuildScheduledEventItemView$configureInternal$3.INSTANCE : function04, (i & 2048) != 0 ? GuildScheduledEventItemView$configureInternal$4.INSTANCE : function05, (i & 4096) != 0 ? GuildScheduledEventItemView$configureInternal$5.INSTANCE : function06);
} }
private final void configureLocation(GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild) { private final void configureLocation(GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild) {
@ -264,7 +264,7 @@ public final class GuildScheduledEventItemView extends ConstraintLayout {
m.checkNotNullParameter(function02, "rsvpButtonClickListener"); m.checkNotNullParameter(function02, "rsvpButtonClickListener");
m.checkNotNullParameter(function03, "joinServerButtonClickListener"); m.checkNotNullParameter(function03, "joinServerButtonClickListener");
m.checkNotNullParameter(function04, "shareButtonClickListener"); m.checkNotNullParameter(function04, "shareButtonClickListener");
configureInternal$default(this, guildScheduledEvent, GuildScheduledEventLocationInfo.Companion.buildLocationInfo(guildScheduledEvent, channel), guild, z3, true, false, true, function0, function02, function03, function04, null, 2048, null); configureInternal$default(this, guildScheduledEvent, GuildScheduledEventLocationInfo.Companion.buildLocationInfo(guildScheduledEvent, channel), guild, z3, true, false, true, function0, function02, function03, function04, null, null, 6144, null);
ConstraintLayout constraintLayout = this.binding.a; ConstraintLayout constraintLayout = this.binding.a;
m.checkNotNullExpressionValue(constraintLayout, "binding.root"); m.checkNotNullExpressionValue(constraintLayout, "binding.root");
constraintLayout.setBackground(ContextCompat.getDrawable(getContext(), R.drawable.bg_guild_scheduled_event_list_item_secondary)); constraintLayout.setBackground(ContextCompat.getDrawable(getContext(), R.drawable.bg_guild_scheduled_event_list_item_secondary));
@ -295,21 +295,22 @@ public final class GuildScheduledEventItemView extends ConstraintLayout {
textView4.setVisibility(i); textView4.setVisibility(i);
} }
public final void configureInEventList(GuildScheduledEventListItem.Event event, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03, Function0<Unit> function04, Function0<Unit> function05) { public final void configureInEventList(GuildScheduledEventListItem.Event event, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03, Function0<Unit> function04, Function0<Unit> function05, Function0<Unit> function06) {
m.checkNotNullParameter(event, "item"); m.checkNotNullParameter(event, "item");
m.checkNotNullParameter(function0, "cardClickListener"); m.checkNotNullParameter(function0, "cardClickListener");
m.checkNotNullParameter(function02, "rsvpButtonClickListener"); m.checkNotNullParameter(function02, "rsvpButtonClickListener");
m.checkNotNullParameter(function03, "eventStartButtonClickListener"); m.checkNotNullParameter(function03, "eventStartButtonClickListener");
m.checkNotNullParameter(function04, "shareButtonClickListener"); m.checkNotNullParameter(function04, "shareButtonClickListener");
m.checkNotNullParameter(function05, "joinButtonClickListener"); m.checkNotNullParameter(function05, "joinButtonClickListener");
configureInternal(event.getEvent(), GuildScheduledEventLocationInfo.Companion.buildLocationInfo(event.getEvent(), event.getChannel()), null, event.isRsvped(), true, event.getCanStartEvent(), event.getCanShare(), function0, function02, function03, function04, function05); m.checkNotNullParameter(function06, "endEventButtonClickListener");
configureInternal(event.getEvent(), GuildScheduledEventLocationInfo.Companion.buildLocationInfo(event.getEvent(), event.getChannel()), null, event.isRsvped(), true, event.getCanStartEvent(), event.getCanShare(), function0, function02, function03, function04, function05, function06);
} }
public final void configureInVoiceChannel(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, Function0<Unit> function0, Function0<Unit> function02) { public final void configureInVoiceChannel(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, Function0<Unit> function0, Function0<Unit> function02) {
m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent"); m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent");
m.checkNotNullParameter(function0, "onCardClicked"); m.checkNotNullParameter(function0, "onCardClicked");
m.checkNotNullParameter(function02, "onStartEventButtonClicked"); m.checkNotNullParameter(function02, "onStartEventButtonClicked");
configureInternal(guildScheduledEvent, null, null, false, false, z2, false, function0, GuildScheduledEventItemView$configureInVoiceChannel$1.INSTANCE, function02, GuildScheduledEventItemView$configureInVoiceChannel$2.INSTANCE, GuildScheduledEventItemView$configureInVoiceChannel$3.INSTANCE); configureInternal$default(this, guildScheduledEvent, null, null, false, false, z2, false, function0, GuildScheduledEventItemView$configureInVoiceChannel$1.INSTANCE, function02, GuildScheduledEventItemView$configureInVoiceChannel$2.INSTANCE, GuildScheduledEventItemView$configureInVoiceChannel$3.INSTANCE, null, 4096, null);
ConstraintLayout constraintLayout = this.binding.a; ConstraintLayout constraintLayout = this.binding.a;
m.checkNotNullExpressionValue(constraintLayout, "binding.root"); m.checkNotNullExpressionValue(constraintLayout, "binding.root");
constraintLayout.setBackground(ContextCompat.getDrawable(getContext(), R.drawable.bg_guild_scheduled_event_list_item_secondary)); constraintLayout.setBackground(ContextCompat.getDrawable(getContext(), R.drawable.bg_guild_scheduled_event_list_item_secondary));

View file

@ -0,0 +1,51 @@
package com.discord.widgets.guildscheduledevent;
import android.content.Context;
import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.widgets.guildscheduledevent.GuildScheduledEventListAdapter;
import com.discord.widgets.guildscheduledevent.GuildScheduledEventListItem;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
/* compiled from: GuildScheduledEventListAdapter.kt */
public final class GuildScheduledEventListAdapter$EventViewHolder$onConfigure$6 extends o implements Function0<Unit> {
public final /* synthetic */ GuildScheduledEventListItem.Event $item;
public final /* synthetic */ GuildScheduledEventListAdapter.EventViewHolder this$0;
/* compiled from: GuildScheduledEventListAdapter.kt */
/* renamed from: com.discord.widgets.guildscheduledevent.GuildScheduledEventListAdapter$EventViewHolder$onConfigure$6$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function1<Unit, Unit> {
public static final AnonymousClass1 INSTANCE = new AnonymousClass1();
public AnonymousClass1() {
super(1);
}
/* 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(Unit unit) {
invoke(unit);
return Unit.a;
}
public final void invoke(Unit unit) {
m.checkNotNullParameter(unit, "it");
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public GuildScheduledEventListAdapter$EventViewHolder$onConfigure$6(GuildScheduledEventListAdapter.EventViewHolder eventViewHolder, GuildScheduledEventListItem.Event event) {
super(0);
this.this$0 = eventViewHolder;
this.$item = event;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(GuildScheduledEventAPI.INSTANCE.endEvent(this.$item.getEvent().g()), false, 1, null), this.this$0.getClass(), (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, AnonymousClass1.INSTANCE, 62, (Object) null);
}
}

View file

@ -45,7 +45,7 @@ public final class GuildScheduledEventListAdapter extends MGRecyclerAdapterSimpl
m.checkNotNullParameter(guildScheduledEventListItem, "data"); m.checkNotNullParameter(guildScheduledEventListItem, "data");
super.onConfigure(i, (int) guildScheduledEventListItem); super.onConfigure(i, (int) guildScheduledEventListItem);
GuildScheduledEventListItem.Event event = (GuildScheduledEventListItem.Event) guildScheduledEventListItem; GuildScheduledEventListItem.Event event = (GuildScheduledEventListItem.Event) guildScheduledEventListItem;
this.binding.b.configureInEventList(event, new GuildScheduledEventListAdapter$EventViewHolder$onConfigure$1(this, event), new GuildScheduledEventListAdapter$EventViewHolder$onConfigure$2(this, event), new GuildScheduledEventListAdapter$EventViewHolder$onConfigure$3(this, event), new GuildScheduledEventListAdapter$EventViewHolder$onConfigure$4(this, event), new GuildScheduledEventListAdapter$EventViewHolder$onConfigure$5(this, event)); this.binding.b.configureInEventList(event, new GuildScheduledEventListAdapter$EventViewHolder$onConfigure$1(this, event), new GuildScheduledEventListAdapter$EventViewHolder$onConfigure$2(this, event), new GuildScheduledEventListAdapter$EventViewHolder$onConfigure$3(this, event), new GuildScheduledEventListAdapter$EventViewHolder$onConfigure$4(this, event), new GuildScheduledEventListAdapter$EventViewHolder$onConfigure$5(this, event), new GuildScheduledEventListAdapter$EventViewHolder$onConfigure$6(this, event));
} }
} }

View file

@ -2,10 +2,13 @@ package com.discord.widgets.guildscheduledevent;
import a0.a.a.b; import a0.a.a.b;
import c.d.b.a.a; import c.d.b.a.a;
import com.discord.api.guildscheduledevent.GuildScheduledEvent;
import com.discord.api.guildscheduledevent.GuildScheduledEventEntityMetadata; import com.discord.api.guildscheduledevent.GuildScheduledEventEntityMetadata;
import com.discord.api.guildscheduledevent.GuildScheduledEventEntityType; import com.discord.api.guildscheduledevent.GuildScheduledEventEntityType;
import com.discord.api.stageinstance.StageInstancePrivacyLevel; import com.discord.api.stageinstance.StageInstancePrivacyLevel;
import com.discord.api.utcdatetime.UtcDateTime;
import com.discord.restapi.RestAPIParams; import com.discord.restapi.RestAPIParams;
import com.discord.utilities.time.TimeUtils;
import d0.z.d.m; import d0.z.d.m;
import java.io.Serializable; import java.io.Serializable;
/* compiled from: GuildScheduledEventModel.kt */ /* compiled from: GuildScheduledEventModel.kt */
@ -221,19 +224,22 @@ public final class GuildScheduledEventModel implements Serializable {
return a.E(P, this.userCount, ")"); return a.E(P, this.userCount, ")");
} }
public final RestAPIParams.UpdateGuildScheduledEventBody toUpdateRequestBody() { public final RestAPIParams.UpdateGuildScheduledEventBody toUpdateRequestBody(GuildScheduledEvent guildScheduledEvent) {
GuildScheduledEventPickerTime guildScheduledEventPickerTime; GuildScheduledEventPickerTime guildScheduledEventPickerTime;
m.checkNotNullParameter(guildScheduledEvent, "currentEvent");
String str = this.name; String str = this.name;
String str2 = null;
if (str == null) { if (str == null) {
return null; return null;
} }
GuildScheduledEventPickerDateTime guildScheduledEventPickerDateTime = GuildScheduledEventPickerDateTime.INSTANCE; GuildScheduledEventPickerDateTime guildScheduledEventPickerDateTime = GuildScheduledEventPickerDateTime.INSTANCE;
String utcDateString = guildScheduledEventPickerDateTime.toUtcDateString(this.startDate, this.startTime); long millis = guildScheduledEventPickerDateTime.toMillis(this.startDate, this.startTime);
GuildScheduledEventPickerDate guildScheduledEventPickerDate = this.endDate; GuildScheduledEventPickerDate guildScheduledEventPickerDate = this.endDate;
if (!(guildScheduledEventPickerDate == null || (guildScheduledEventPickerTime = this.endTime) == null)) { Long valueOf = (guildScheduledEventPickerDate == null || (guildScheduledEventPickerTime = this.endTime) == null) ? null : Long.valueOf(guildScheduledEventPickerDateTime.toMillis(guildScheduledEventPickerDate, guildScheduledEventPickerTime));
str2 = guildScheduledEventPickerDateTime.toUtcDateString(guildScheduledEventPickerDate, guildScheduledEventPickerTime); Long l = this.channelId;
} String str2 = this.description;
return new RestAPIParams.UpdateGuildScheduledEventBody(str, this.description, StageInstancePrivacyLevel.GUILD_ONLY, utcDateString, str2, this.channelId, this.entityMetadata, null, 128, null); StageInstancePrivacyLevel stageInstancePrivacyLevel = StageInstancePrivacyLevel.GUILD_ONLY;
String uTCDateTime$default = guildScheduledEvent.j().g() == millis ? null : TimeUtils.toUTCDateTime$default(Long.valueOf(millis), null, 2, null);
UtcDateTime i = guildScheduledEvent.i();
return new RestAPIParams.UpdateGuildScheduledEventBody(str, str2, stageInstancePrivacyLevel, uTCDateTime$default, m.areEqual(i != null ? Long.valueOf(i.g()) : null, valueOf) ? null : TimeUtils.toUTCDateTime$default(valueOf, null, 2, null), l, this.entityMetadata, null, 128, null);
} }
} }

View file

@ -13,7 +13,7 @@ public final class GuildScheduledEventPickerDateTime {
} }
private final Pair<GuildScheduledEventPickerDate, GuildScheduledEventPickerTime> toGuildScheduledEventPickerDateTime(Calendar calendar) { private final Pair<GuildScheduledEventPickerDate, GuildScheduledEventPickerTime> toGuildScheduledEventPickerDateTime(Calendar calendar) {
return new Pair<>(new GuildScheduledEventPickerDate(calendar.get(1), calendar.get(2), calendar.get(5)), new GuildScheduledEventPickerTime(calendar.get(11), calendar.get(12))); return new Pair<>(new GuildScheduledEventPickerDate(calendar.get(1), calendar.get(2), calendar.get(5)), new GuildScheduledEventPickerTime(calendar.get(11), calendar.get(12), calendar.get(13)));
} }
public final Pair<GuildScheduledEventPickerDate, GuildScheduledEventPickerTime> fromUtcDateTime(UtcDateTime utcDateTime) { public final Pair<GuildScheduledEventPickerDate, GuildScheduledEventPickerTime> fromUtcDateTime(UtcDateTime utcDateTime) {
@ -35,7 +35,7 @@ public final class GuildScheduledEventPickerDateTime {
m.checkNotNullParameter(guildScheduledEventPickerDate, "startDate"); m.checkNotNullParameter(guildScheduledEventPickerDate, "startDate");
m.checkNotNullParameter(guildScheduledEventPickerTime, "startTime"); m.checkNotNullParameter(guildScheduledEventPickerTime, "startTime");
Calendar instance = Calendar.getInstance(); Calendar instance = Calendar.getInstance();
instance.set(guildScheduledEventPickerDate.getYear(), guildScheduledEventPickerDate.getMonth(), guildScheduledEventPickerDate.getDayOfMonth(), guildScheduledEventPickerTime.getHourOfDay(), guildScheduledEventPickerTime.getMinute()); instance.set(guildScheduledEventPickerDate.getYear(), guildScheduledEventPickerDate.getMonth(), guildScheduledEventPickerDate.getDayOfMonth(), guildScheduledEventPickerTime.getHourOfDay(), guildScheduledEventPickerTime.getMinute(), guildScheduledEventPickerTime.getSecond());
instance.add(11, 1); instance.add(11, 1);
m.checkNotNullExpressionValue(instance, "Calendar.getInstance().a…r.HOUR_OF_DAY, 1)\n }"); m.checkNotNullExpressionValue(instance, "Calendar.getInstance().a…r.HOUR_OF_DAY, 1)\n }");
return toGuildScheduledEventPickerDateTime(instance); return toGuildScheduledEventPickerDateTime(instance);
@ -45,8 +45,9 @@ public final class GuildScheduledEventPickerDateTime {
m.checkNotNullParameter(guildScheduledEventPickerDate, "date"); m.checkNotNullParameter(guildScheduledEventPickerDate, "date");
m.checkNotNullParameter(guildScheduledEventPickerTime, "time"); m.checkNotNullParameter(guildScheduledEventPickerTime, "time");
Calendar instance = Calendar.getInstance(); Calendar instance = Calendar.getInstance();
instance.set(guildScheduledEventPickerDate.getYear(), guildScheduledEventPickerDate.getMonth(), guildScheduledEventPickerDate.getDayOfMonth(), guildScheduledEventPickerTime.getHourOfDay(), guildScheduledEventPickerTime.getMinute()); instance.set(guildScheduledEventPickerDate.getYear(), guildScheduledEventPickerDate.getMonth(), guildScheduledEventPickerDate.getDayOfMonth(), guildScheduledEventPickerTime.getHourOfDay(), guildScheduledEventPickerTime.getMinute(), guildScheduledEventPickerTime.getSecond());
m.checkNotNullExpressionValue(instance, "Calendar.getInstance().a…Day, time.minute)\n }"); instance.clear(14);
m.checkNotNullExpressionValue(instance, "Calendar.getInstance().a…ndar.MILLISECOND)\n }");
return instance.getTimeInMillis(); return instance.getTimeInMillis();
} }

View file

@ -6,20 +6,25 @@ import java.io.Serializable;
public final class GuildScheduledEventPickerTime implements Serializable { public final class GuildScheduledEventPickerTime implements Serializable {
private final int hourOfDay; private final int hourOfDay;
private final int minute; private final int minute;
private final int second;
public GuildScheduledEventPickerTime(int i, int i2) { public GuildScheduledEventPickerTime(int i, int i2, int i3) {
this.hourOfDay = i; this.hourOfDay = i;
this.minute = i2; this.minute = i2;
this.second = i3;
} }
public static /* synthetic */ GuildScheduledEventPickerTime copy$default(GuildScheduledEventPickerTime guildScheduledEventPickerTime, int i, int i2, int i3, Object obj) { public static /* synthetic */ GuildScheduledEventPickerTime copy$default(GuildScheduledEventPickerTime guildScheduledEventPickerTime, int i, int i2, int i3, int i4, Object obj) {
if ((i3 & 1) != 0) { if ((i4 & 1) != 0) {
i = guildScheduledEventPickerTime.hourOfDay; i = guildScheduledEventPickerTime.hourOfDay;
} }
if ((i3 & 2) != 0) { if ((i4 & 2) != 0) {
i2 = guildScheduledEventPickerTime.minute; i2 = guildScheduledEventPickerTime.minute;
} }
return guildScheduledEventPickerTime.copy(i, i2); if ((i4 & 4) != 0) {
i3 = guildScheduledEventPickerTime.second;
}
return guildScheduledEventPickerTime.copy(i, i2, i3);
} }
public final int component1() { public final int component1() {
@ -30,8 +35,12 @@ public final class GuildScheduledEventPickerTime implements Serializable {
return this.minute; return this.minute;
} }
public final GuildScheduledEventPickerTime copy(int i, int i2) { public final int component3() {
return new GuildScheduledEventPickerTime(i, i2); return this.second;
}
public final GuildScheduledEventPickerTime copy(int i, int i2, int i3) {
return new GuildScheduledEventPickerTime(i, i2, i3);
} }
@Override // java.lang.Object @Override // java.lang.Object
@ -43,7 +52,7 @@ public final class GuildScheduledEventPickerTime implements Serializable {
return false; return false;
} }
GuildScheduledEventPickerTime guildScheduledEventPickerTime = (GuildScheduledEventPickerTime) obj; GuildScheduledEventPickerTime guildScheduledEventPickerTime = (GuildScheduledEventPickerTime) obj;
return this.hourOfDay == guildScheduledEventPickerTime.hourOfDay && this.minute == guildScheduledEventPickerTime.minute; return this.hourOfDay == guildScheduledEventPickerTime.hourOfDay && this.minute == guildScheduledEventPickerTime.minute && this.second == guildScheduledEventPickerTime.second;
} }
public final int getHourOfDay() { public final int getHourOfDay() {
@ -54,9 +63,13 @@ public final class GuildScheduledEventPickerTime implements Serializable {
return this.minute; return this.minute;
} }
public final int getSecond() {
return this.second;
}
@Override // java.lang.Object @Override // java.lang.Object
public int hashCode() { public int hashCode() {
return (this.hourOfDay * 31) + this.minute; return (((this.hourOfDay * 31) + this.minute) * 31) + this.second;
} }
@Override // java.lang.Object @Override // java.lang.Object
@ -64,6 +77,8 @@ public final class GuildScheduledEventPickerTime implements Serializable {
StringBuilder P = a.P("GuildScheduledEventPickerTime(hourOfDay="); StringBuilder P = a.P("GuildScheduledEventPickerTime(hourOfDay=");
P.append(this.hourOfDay); P.append(this.hourOfDay);
P.append(", minute="); P.append(", minute=");
return a.z(P, this.minute, ")"); P.append(this.minute);
P.append(", second=");
return a.z(P, this.second, ")");
} }
} }

View file

@ -4,6 +4,7 @@ import c.d.b.a.a;
import com.discord.api.guildscheduledevent.GuildScheduledEvent; import com.discord.api.guildscheduledevent.GuildScheduledEvent;
import com.discord.api.guildscheduledevent.GuildScheduledEventEntityMetadata; import com.discord.api.guildscheduledevent.GuildScheduledEventEntityMetadata;
import com.discord.api.guildscheduledevent.GuildScheduledEventEntityType; import com.discord.api.guildscheduledevent.GuildScheduledEventEntityType;
import com.discord.api.utcdatetime.UtcDateTime;
import com.discord.app.AppViewModel; import com.discord.app.AppViewModel;
import com.discord.models.domain.ModelAuditLogEntry; import com.discord.models.domain.ModelAuditLogEntry;
import com.discord.stores.StoreGuildScheduledEvents; import com.discord.stores.StoreGuildScheduledEvents;
@ -44,52 +45,74 @@ public final class GuildScheduledEventSettingsViewModel extends AppViewModel<Vie
/* compiled from: GuildScheduledEventSettingsViewModel.kt */ /* compiled from: GuildScheduledEventSettingsViewModel.kt */
public static final class Initialized extends ViewState { public static final class Initialized extends ViewState {
private final GuildScheduledEventModel eventModel; private final GuildScheduledEventModel eventModel;
private final GuildScheduledEvent existingEvent;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public Initialized(GuildScheduledEventModel guildScheduledEventModel) { public Initialized(GuildScheduledEventModel guildScheduledEventModel, GuildScheduledEvent guildScheduledEvent) {
super(null); super(null);
m.checkNotNullParameter(guildScheduledEventModel, "eventModel"); m.checkNotNullParameter(guildScheduledEventModel, "eventModel");
this.eventModel = guildScheduledEventModel; this.eventModel = guildScheduledEventModel;
this.existingEvent = guildScheduledEvent;
} }
public static /* synthetic */ Initialized copy$default(Initialized initialized, GuildScheduledEventModel guildScheduledEventModel, int i, Object obj) { public static /* synthetic */ Initialized copy$default(Initialized initialized, GuildScheduledEventModel guildScheduledEventModel, GuildScheduledEvent guildScheduledEvent, int i, Object obj) {
if ((i & 1) != 0) { if ((i & 1) != 0) {
guildScheduledEventModel = initialized.eventModel; guildScheduledEventModel = initialized.eventModel;
} }
return initialized.copy(guildScheduledEventModel); if ((i & 2) != 0) {
guildScheduledEvent = initialized.existingEvent;
}
return initialized.copy(guildScheduledEventModel, guildScheduledEvent);
} }
public final GuildScheduledEventModel component1() { public final GuildScheduledEventModel component1() {
return this.eventModel; return this.eventModel;
} }
public final Initialized copy(GuildScheduledEventModel guildScheduledEventModel) { public final GuildScheduledEvent component2() {
return this.existingEvent;
}
public final Initialized copy(GuildScheduledEventModel guildScheduledEventModel, GuildScheduledEvent guildScheduledEvent) {
m.checkNotNullParameter(guildScheduledEventModel, "eventModel"); m.checkNotNullParameter(guildScheduledEventModel, "eventModel");
return new Initialized(guildScheduledEventModel); return new Initialized(guildScheduledEventModel, guildScheduledEvent);
} }
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this != obj) { if (this == obj) {
return (obj instanceof Initialized) && m.areEqual(this.eventModel, ((Initialized) obj).eventModel); return true;
} }
return true; if (!(obj instanceof Initialized)) {
return false;
}
Initialized initialized = (Initialized) obj;
return m.areEqual(this.eventModel, initialized.eventModel) && m.areEqual(this.existingEvent, initialized.existingEvent);
} }
public final GuildScheduledEventModel getEventModel() { public final GuildScheduledEventModel getEventModel() {
return this.eventModel; return this.eventModel;
} }
public final GuildScheduledEvent getExistingEvent() {
return this.existingEvent;
}
public int hashCode() { public int hashCode() {
GuildScheduledEventModel guildScheduledEventModel = this.eventModel; GuildScheduledEventModel guildScheduledEventModel = this.eventModel;
if (guildScheduledEventModel != null) { int i = 0;
return guildScheduledEventModel.hashCode(); int hashCode = (guildScheduledEventModel != null ? guildScheduledEventModel.hashCode() : 0) * 31;
GuildScheduledEvent guildScheduledEvent = this.existingEvent;
if (guildScheduledEvent != null) {
i = guildScheduledEvent.hashCode();
} }
return 0; return hashCode + i;
} }
public String toString() { public String toString() {
StringBuilder P = a.P("Initialized(eventModel="); StringBuilder P = a.P("Initialized(eventModel=");
P.append(this.eventModel); P.append(this.eventModel);
P.append(", existingEvent=");
P.append(this.existingEvent);
P.append(")"); P.append(")");
return P.toString(); return P.toString();
} }
@ -115,23 +138,26 @@ public final class GuildScheduledEventSettingsViewModel extends AppViewModel<Vie
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public GuildScheduledEventSettingsViewModel(long j, Long l, GuildScheduledEventEntityType guildScheduledEventEntityType, Long l2, String str, StoreGuildScheduledEvents storeGuildScheduledEvents) { public GuildScheduledEventSettingsViewModel(long j, Long l, GuildScheduledEventEntityType guildScheduledEventEntityType, Long l2, String str, StoreGuildScheduledEvents storeGuildScheduledEvents) {
super(null, 1, null); super(null, 1, null);
GuildScheduledEvent guildScheduledEvent;
GuildScheduledEventEntityType guildScheduledEventEntityType2; GuildScheduledEventEntityType guildScheduledEventEntityType2;
GuildScheduledEvent findEventFromStore;
GuildScheduledEventModel model; GuildScheduledEventModel model;
m.checkNotNullParameter(guildScheduledEventEntityType, "entityType"); m.checkNotNullParameter(guildScheduledEventEntityType, "entityType");
m.checkNotNullParameter(storeGuildScheduledEvents, "guildScheduledEventsStore"); m.checkNotNullParameter(storeGuildScheduledEvents, "guildScheduledEventsStore");
GuildScheduledEventModel guildScheduledEventModel = null; GuildScheduledEventModel guildScheduledEventModel = null;
List<Long> b = null; List<Long> b = null;
if (l == null || (findEventFromStore = storeGuildScheduledEvents.findEventFromStore(l.longValue(), Long.valueOf(j))) == null || (model = GuildScheduledEventModelKt.toModel(findEventFromStore)) == null) { GuildScheduledEvent findEventFromStore = l != null ? storeGuildScheduledEvents.findEventFromStore(l.longValue(), Long.valueOf(j)) : null;
if (findEventFromStore == null || (model = GuildScheduledEventModelKt.toModel(findEventFromStore)) == null) {
guildScheduledEvent = findEventFromStore;
guildScheduledEventEntityType2 = guildScheduledEventEntityType; guildScheduledEventEntityType2 = guildScheduledEventEntityType;
} else { } else {
GuildScheduledEventEntityMetadata.Companion companion = GuildScheduledEventEntityMetadata.Companion; GuildScheduledEventEntityMetadata.Companion companion = GuildScheduledEventEntityMetadata.Companion;
GuildScheduledEventEntityMetadata d = findEventFromStore.d(); GuildScheduledEventEntityMetadata d = findEventFromStore.d();
guildScheduledEvent = findEventFromStore;
guildScheduledEventEntityType2 = guildScheduledEventEntityType; guildScheduledEventEntityType2 = guildScheduledEventEntityType;
guildScheduledEventModel = GuildScheduledEventModel.copy$default(model, 0, null, null, null, null, null, null, null, guildScheduledEventEntityType, companion.a(guildScheduledEventEntityType, d != null ? d.b() : b, str), null, 1279, null); guildScheduledEventModel = GuildScheduledEventModel.copy$default(model, 0, null, l2, null, null, null, null, null, guildScheduledEventEntityType, companion.a(guildScheduledEventEntityType, d != null ? d.b() : b, str), null, 1275, null);
} }
Pair<GuildScheduledEventPickerDate, GuildScheduledEventPickerTime> generateAppropriateStartDateTime = GuildScheduledEventPickerDateTime.INSTANCE.generateAppropriateStartDateTime(); Pair<GuildScheduledEventPickerDate, GuildScheduledEventPickerTime> generateAppropriateStartDateTime = GuildScheduledEventPickerDateTime.INSTANCE.generateAppropriateStartDateTime();
updateViewState(new ViewState.Initialized(guildScheduledEventModel == null ? new GuildScheduledEventModel(j, null, l2, generateAppropriateStartDateTime.getFirst(), generateAppropriateStartDateTime.getSecond(), null, null, null, guildScheduledEventEntityType, GuildScheduledEventEntityMetadata.Companion.a(guildScheduledEventEntityType2, n.emptyList(), str), Integer.valueOf((int) SAMPLE_USER_COUNT)) : guildScheduledEventModel)); updateViewState(new ViewState.Initialized(guildScheduledEventModel == null ? new GuildScheduledEventModel(j, null, l2, generateAppropriateStartDateTime.getFirst(), generateAppropriateStartDateTime.getSecond(), null, null, null, guildScheduledEventEntityType, GuildScheduledEventEntityMetadata.Companion.a(guildScheduledEventEntityType2, n.emptyList(), str), Integer.valueOf((int) SAMPLE_USER_COUNT)) : guildScheduledEventModel, guildScheduledEvent));
} }
/* JADX INFO: this call moved to the top of the method (can break code semantics) */ /* JADX INFO: this call moved to the top of the method (can break code semantics) */
@ -148,10 +174,29 @@ public final class GuildScheduledEventSettingsViewModel extends AppViewModel<Vie
if (initialized == null) { if (initialized == null) {
return null; return null;
} }
updateViewState(initialized.copy(guildScheduledEventModel)); updateViewState(ViewState.Initialized.copy$default(initialized, guildScheduledEventModel, null, 2, null));
return Unit.a; return Unit.a;
} }
public final boolean hasEndTimeChanged(ViewState.Initialized initialized) {
m.checkNotNullParameter(initialized, "viewState");
if (initialized.getExistingEvent() == null) {
return true;
}
if (initialized.getEventModel().getEndDate() == null || initialized.getEventModel().getEndTime() == null) {
return initialized.getExistingEvent().i() == null;
}
long millis = GuildScheduledEventPickerDateTime.INSTANCE.toMillis(initialized.getEventModel().getEndDate(), initialized.getEventModel().getEndTime());
UtcDateTime i = initialized.getExistingEvent().i();
Long valueOf = i != null ? Long.valueOf(i.g()) : null;
return valueOf == null || millis != valueOf.longValue();
}
public final boolean hasStartTimeChanged(ViewState.Initialized initialized) {
m.checkNotNullParameter(initialized, "viewState");
return initialized.getExistingEvent() == null || GuildScheduledEventPickerDateTime.INSTANCE.toMillis(initialized.getEventModel().getStartDate(), initialized.getEventModel().getStartTime()) != initialized.getExistingEvent().j().g();
}
public final boolean isDateInFuture(GuildScheduledEventPickerDate guildScheduledEventPickerDate, GuildScheduledEventPickerTime guildScheduledEventPickerTime) { public final boolean isDateInFuture(GuildScheduledEventPickerDate guildScheduledEventPickerDate, GuildScheduledEventPickerTime guildScheduledEventPickerTime) {
return guildScheduledEventPickerDate == null || guildScheduledEventPickerTime == null || GuildScheduledEventPickerDateTime.INSTANCE.toMillis(guildScheduledEventPickerDate, guildScheduledEventPickerTime) >= ClockFactory.get().currentTimeMillis(); return guildScheduledEventPickerDate == null || guildScheduledEventPickerTime == null || GuildScheduledEventPickerDateTime.INSTANCE.toMillis(guildScheduledEventPickerDate, guildScheduledEventPickerTime) >= ClockFactory.get().currentTimeMillis();
} }
@ -212,11 +257,7 @@ public final class GuildScheduledEventSettingsViewModel extends AppViewModel<Vie
if (initialized == null || (eventModel = initialized.getEventModel()) == null) { if (initialized == null || (eventModel = initialized.getEventModel()) == null) {
return DateError.INVALID_VIEW_STATE; return DateError.INVALID_VIEW_STATE;
} }
GuildScheduledEventPickerDate guildScheduledEventPickerDate = new GuildScheduledEventPickerDate(i, i2, i3); updateEventModel(GuildScheduledEventModel.copy$default(eventModel, 0, null, null, null, null, new GuildScheduledEventPickerDate(i, i2, i3), null, null, null, null, null, 2015, null));
if (!isDateInFuture(guildScheduledEventPickerDate, eventModel.getEndTime())) {
return DateError.END_DATE_IN_PAST;
}
updateEventModel(GuildScheduledEventModel.copy$default(eventModel, 0, null, null, null, null, guildScheduledEventPickerDate, null, null, null, null, null, 2015, null));
return null; return null;
} }
@ -230,11 +271,7 @@ public final class GuildScheduledEventSettingsViewModel extends AppViewModel<Vie
if (initialized == null || (eventModel = initialized.getEventModel()) == null) { if (initialized == null || (eventModel = initialized.getEventModel()) == null) {
return DateError.INVALID_VIEW_STATE; return DateError.INVALID_VIEW_STATE;
} }
GuildScheduledEventPickerTime guildScheduledEventPickerTime = new GuildScheduledEventPickerTime(i, i2); updateEventModel(GuildScheduledEventModel.copy$default(eventModel, 0, null, null, null, null, null, new GuildScheduledEventPickerTime(i, i2, 0), null, null, null, null, 1983, null));
if (!isDateInFuture(eventModel.getEndDate(), guildScheduledEventPickerTime)) {
return DateError.END_DATE_IN_PAST;
}
updateEventModel(GuildScheduledEventModel.copy$default(eventModel, 0, null, null, null, null, null, guildScheduledEventPickerTime, null, null, null, null, 1983, null));
return null; return null;
} }
@ -248,11 +285,7 @@ public final class GuildScheduledEventSettingsViewModel extends AppViewModel<Vie
if (initialized == null || (eventModel = initialized.getEventModel()) == null) { if (initialized == null || (eventModel = initialized.getEventModel()) == null) {
return DateError.INVALID_VIEW_STATE; return DateError.INVALID_VIEW_STATE;
} }
GuildScheduledEventPickerDate guildScheduledEventPickerDate = new GuildScheduledEventPickerDate(i, i2, i3); updateEventModel(GuildScheduledEventModel.copy$default(eventModel, 0, null, null, new GuildScheduledEventPickerDate(i, i2, i3), null, null, null, null, null, null, null, 2039, null));
if (!isDateInFuture(guildScheduledEventPickerDate, eventModel.getStartTime())) {
return DateError.START_DATE_IN_PAST;
}
updateEventModel(GuildScheduledEventModel.copy$default(eventModel, 0, null, null, guildScheduledEventPickerDate, null, null, null, null, null, null, null, 2039, null));
return null; return null;
} }
@ -266,11 +299,7 @@ public final class GuildScheduledEventSettingsViewModel extends AppViewModel<Vie
if (initialized == null || (eventModel = initialized.getEventModel()) == null) { if (initialized == null || (eventModel = initialized.getEventModel()) == null) {
return DateError.INVALID_VIEW_STATE; return DateError.INVALID_VIEW_STATE;
} }
GuildScheduledEventPickerTime guildScheduledEventPickerTime = new GuildScheduledEventPickerTime(i, i2); updateEventModel(GuildScheduledEventModel.copy$default(eventModel, 0, null, null, null, new GuildScheduledEventPickerTime(i, i2, 0), null, null, null, null, null, null, 2031, null));
if (!isDateInFuture(eventModel.getStartDate(), guildScheduledEventPickerTime)) {
return DateError.START_DATE_IN_PAST;
}
updateEventModel(GuildScheduledEventModel.copy$default(eventModel, 0, null, null, null, guildScheduledEventPickerTime, null, null, null, null, null, null, 2031, null));
return null; return null;
} }

View file

@ -6,11 +6,11 @@ import d0.z.d.o;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: PreviewGuildScheduledEventViewModel.kt */ /* compiled from: PreviewGuildScheduledEventViewModel.kt */
public final class PreviewGuildScheduledEventViewModel$startVoiceEvent$1 extends o implements Function1<Error, Unit> { public final class PreviewGuildScheduledEventViewModel$startEvent$1 extends o implements Function1<Error, Unit> {
public final /* synthetic */ PreviewGuildScheduledEventViewModel this$0; public final /* synthetic */ PreviewGuildScheduledEventViewModel this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public PreviewGuildScheduledEventViewModel$startVoiceEvent$1(PreviewGuildScheduledEventViewModel previewGuildScheduledEventViewModel) { public PreviewGuildScheduledEventViewModel$startEvent$1(PreviewGuildScheduledEventViewModel previewGuildScheduledEventViewModel) {
super(1); super(1);
this.this$0 = previewGuildScheduledEventViewModel; this.this$0 = previewGuildScheduledEventViewModel;
} }

View file

@ -6,12 +6,12 @@ import kotlin.Unit;
import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
/* compiled from: PreviewGuildScheduledEventViewModel.kt */ /* compiled from: PreviewGuildScheduledEventViewModel.kt */
public final class PreviewGuildScheduledEventViewModel$startVoiceEvent$2 extends o implements Function1<Unit, Unit> { public final class PreviewGuildScheduledEventViewModel$startEvent$2 extends o implements Function1<Unit, Unit> {
public final /* synthetic */ Function0 $onRequestSuccess; public final /* synthetic */ Function0 $onRequestSuccess;
public final /* synthetic */ PreviewGuildScheduledEventViewModel this$0; public final /* synthetic */ PreviewGuildScheduledEventViewModel this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public PreviewGuildScheduledEventViewModel$startVoiceEvent$2(PreviewGuildScheduledEventViewModel previewGuildScheduledEventViewModel, Function0 function0) { public PreviewGuildScheduledEventViewModel$startEvent$2(PreviewGuildScheduledEventViewModel previewGuildScheduledEventViewModel, Function0 function0) {
super(1); super(1);
this.this$0 = previewGuildScheduledEventViewModel; this.this$0 = previewGuildScheduledEventViewModel;
this.$onRequestSuccess = function0; this.$onRequestSuccess = function0;

View file

@ -4,12 +4,14 @@ import android.content.Context;
import c.d.b.a.a; import c.d.b.a.a;
import com.airbnb.lottie.parser.AnimatableValueParser; import com.airbnb.lottie.parser.AnimatableValueParser;
import com.discord.api.channel.Channel; import com.discord.api.channel.Channel;
import com.discord.api.guildscheduledevent.GuildScheduledEvent;
import com.discord.api.guildscheduledevent.GuildScheduledEventEntityType; import com.discord.api.guildscheduledevent.GuildScheduledEventEntityType;
import com.discord.api.permission.Permission; import com.discord.api.permission.Permission;
import com.discord.api.stageinstance.StageInstancePrivacyLevel; import com.discord.api.stageinstance.StageInstancePrivacyLevel;
import com.discord.app.AppViewModel; import com.discord.app.AppViewModel;
import com.discord.restapi.RestAPIParams; import com.discord.restapi.RestAPIParams;
import com.discord.stores.StoreChannels; import com.discord.stores.StoreChannels;
import com.discord.stores.StoreGuildScheduledEvents;
import com.discord.stores.StorePermissions; import com.discord.stores.StorePermissions;
import com.discord.stores.StoreStream; import com.discord.stores.StoreStream;
import com.discord.utilities.permissions.PermissionUtils; import com.discord.utilities.permissions.PermissionUtils;
@ -29,6 +31,7 @@ public final class PreviewGuildScheduledEventViewModel extends AppViewModel<View
private ViewState currentViewState; private ViewState currentViewState;
private final GuildScheduledEventModel eventModel; private final GuildScheduledEventModel eventModel;
private final WidgetPreviewGuildScheduledEvent.Companion.ExistingEventData existingEventData; private final WidgetPreviewGuildScheduledEvent.Companion.ExistingEventData existingEventData;
private final StoreGuildScheduledEvents guildScheduledEventsStore;
private final StorePermissions permissionsStore; private final StorePermissions permissionsStore;
/* compiled from: PreviewGuildScheduledEventViewModel.kt */ /* compiled from: PreviewGuildScheduledEventViewModel.kt */
@ -210,21 +213,22 @@ public final class PreviewGuildScheduledEventViewModel extends AppViewModel<View
GuildScheduledEventEntityType.values(); GuildScheduledEventEntityType.values();
int[] iArr = new int[5]; int[] iArr = new int[5];
$EnumSwitchMapping$0 = iArr; $EnumSwitchMapping$0 = iArr;
iArr[GuildScheduledEventEntityType.VOICE.ordinal()] = 1; iArr[GuildScheduledEventEntityType.STAGE_INSTANCE.ordinal()] = 1;
iArr[GuildScheduledEventEntityType.STAGE_INSTANCE.ordinal()] = 2;
} }
} }
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public PreviewGuildScheduledEventViewModel(GuildScheduledEventModel guildScheduledEventModel, WidgetPreviewGuildScheduledEvent.Companion.ExistingEventData existingEventData, StoreChannels storeChannels, StorePermissions storePermissions) { public PreviewGuildScheduledEventViewModel(GuildScheduledEventModel guildScheduledEventModel, WidgetPreviewGuildScheduledEvent.Companion.ExistingEventData existingEventData, StoreChannels storeChannels, StorePermissions storePermissions, StoreGuildScheduledEvents storeGuildScheduledEvents) {
super(ViewState.Initial.INSTANCE); super(ViewState.Initial.INSTANCE);
m.checkNotNullParameter(guildScheduledEventModel, "eventModel"); m.checkNotNullParameter(guildScheduledEventModel, "eventModel");
m.checkNotNullParameter(storeChannels, "channelsStore"); m.checkNotNullParameter(storeChannels, "channelsStore");
m.checkNotNullParameter(storePermissions, "permissionsStore"); m.checkNotNullParameter(storePermissions, "permissionsStore");
m.checkNotNullParameter(storeGuildScheduledEvents, "guildScheduledEventsStore");
this.eventModel = guildScheduledEventModel; this.eventModel = guildScheduledEventModel;
this.existingEventData = existingEventData; this.existingEventData = existingEventData;
this.channelsStore = storeChannels; this.channelsStore = storeChannels;
this.permissionsStore = storePermissions; this.permissionsStore = storePermissions;
this.guildScheduledEventsStore = storeGuildScheduledEvents;
WidgetPreviewGuildScheduledEvent.Companion.Action action = null; WidgetPreviewGuildScheduledEvent.Companion.Action action = null;
boolean z2 = (existingEventData != null ? existingEventData.getAction() : null) == WidgetPreviewGuildScheduledEvent.Companion.Action.START_EVENT; boolean z2 = (existingEventData != null ? existingEventData.getAction() : null) == WidgetPreviewGuildScheduledEvent.Companion.Action.START_EVENT;
Long channelId = guildScheduledEventModel.getChannelId(); Long channelId = guildScheduledEventModel.getChannelId();
@ -235,8 +239,8 @@ public final class PreviewGuildScheduledEventViewModel extends AppViewModel<View
} }
/* JADX INFO: this call moved to the top of the method (can break code semantics) */ /* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ PreviewGuildScheduledEventViewModel(GuildScheduledEventModel guildScheduledEventModel, WidgetPreviewGuildScheduledEvent.Companion.ExistingEventData existingEventData, StoreChannels storeChannels, StorePermissions storePermissions, int i, DefaultConstructorMarker defaultConstructorMarker) { public /* synthetic */ PreviewGuildScheduledEventViewModel(GuildScheduledEventModel guildScheduledEventModel, WidgetPreviewGuildScheduledEvent.Companion.ExistingEventData existingEventData, StoreChannels storeChannels, StorePermissions storePermissions, StoreGuildScheduledEvents storeGuildScheduledEvents, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(guildScheduledEventModel, existingEventData, (i & 4) != 0 ? StoreStream.Companion.getChannels() : storeChannels, (i & 8) != 0 ? StoreStream.Companion.getPermissions() : storePermissions); this(guildScheduledEventModel, existingEventData, (i & 4) != 0 ? StoreStream.Companion.getChannels() : storeChannels, (i & 8) != 0 ? StoreStream.Companion.getPermissions() : storePermissions, (i & 16) != 0 ? StoreStream.Companion.getGuildScheduledEvents() : storeGuildScheduledEvents);
} }
public static final /* synthetic */ void access$setRequestFinished(PreviewGuildScheduledEventViewModel previewGuildScheduledEventViewModel) { public static final /* synthetic */ void access$setRequestFinished(PreviewGuildScheduledEventViewModel previewGuildScheduledEventViewModel) {
@ -259,13 +263,12 @@ public final class PreviewGuildScheduledEventViewModel extends AppViewModel<View
} }
private final void editEvent(Context context, Function0<Unit> function0) { private final void editEvent(Context context, Function0<Unit> function0) {
long guildScheduledEventId;
GuildScheduledEvent findEventFromStore;
RestAPIParams.UpdateGuildScheduledEventBody updateRequestBody;
WidgetPreviewGuildScheduledEvent.Companion.ExistingEventData existingEventData = this.existingEventData; WidgetPreviewGuildScheduledEvent.Companion.ExistingEventData existingEventData = this.existingEventData;
if (existingEventData != null) { if (existingEventData != null && (findEventFromStore = this.guildScheduledEventsStore.findEventFromStore((guildScheduledEventId = existingEventData.getGuildScheduledEventId()), Long.valueOf(this.eventModel.getGuildId()))) != null && (updateRequestBody = this.eventModel.toUpdateRequestBody(findEventFromStore)) != null) {
long guildScheduledEventId = existingEventData.getGuildScheduledEventId(); ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().updateGuildScheduledEvent(guildScheduledEventId, updateRequestBody), false, 1, null), this, null, 2, null), PreviewGuildScheduledEventViewModel.class, context, (Function1) null, new PreviewGuildScheduledEventViewModel$editEvent$1(this), (Function0) null, (Function0) null, new PreviewGuildScheduledEventViewModel$editEvent$2(this, function0), 52, (Object) null);
RestAPIParams.UpdateGuildScheduledEventBody updateRequestBody = this.eventModel.toUpdateRequestBody();
if (updateRequestBody != null) {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().updateGuildScheduledEvent(guildScheduledEventId, updateRequestBody), false, 1, null), this, null, 2, null), PreviewGuildScheduledEventViewModel.class, context, (Function1) null, new PreviewGuildScheduledEventViewModel$editEvent$1(this), (Function0) null, (Function0) null, new PreviewGuildScheduledEventViewModel$editEvent$2(this, function0), 52, (Object) null);
}
} }
} }
@ -282,6 +285,13 @@ public final class PreviewGuildScheduledEventViewModel extends AppViewModel<View
updateViewState(ViewState.Initialized.copy$default((ViewState.Initialized) requireViewState, false, null, false, null, null, 30, null)); updateViewState(ViewState.Initialized.copy$default((ViewState.Initialized) requireViewState, false, null, false, null, null, 30, null));
} }
private final void startEvent(Context context, Function0<Unit> function0) {
WidgetPreviewGuildScheduledEvent.Companion.ExistingEventData existingEventData = this.existingEventData;
if (existingEventData != null) {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(GuildScheduledEventAPI.INSTANCE.startEvent(existingEventData.getGuildScheduledEventId()), false, 1, null), this, null, 2, null), PreviewGuildScheduledEventViewModel.class, context, (Function1) null, new PreviewGuildScheduledEventViewModel$startEvent$1(this), (Function0) null, (Function0) null, new PreviewGuildScheduledEventViewModel$startEvent$2(this, function0), 52, (Object) null);
}
}
private final void startStageEvent(Context context, boolean z2, Function0<Unit> function0) { private final void startStageEvent(Context context, boolean z2, Function0<Unit> function0) {
if (this.eventModel.getName() != null && this.eventModel.getChannelId() != null) { if (this.eventModel.getName() != null && this.eventModel.getChannelId() != null) {
WidgetPreviewGuildScheduledEvent.Companion.ExistingEventData existingEventData = this.existingEventData; WidgetPreviewGuildScheduledEvent.Companion.ExistingEventData existingEventData = this.existingEventData;
@ -289,13 +299,6 @@ public final class PreviewGuildScheduledEventViewModel extends AppViewModel<View
} }
} }
private final void startVoiceEvent(Context context, Function0<Unit> function0) {
WidgetPreviewGuildScheduledEvent.Companion.ExistingEventData existingEventData = this.existingEventData;
if (existingEventData != null) {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(GuildScheduledEventAPI.INSTANCE.startEvent(existingEventData.getGuildScheduledEventId()), false, 1, null), this, null, 2, null), PreviewGuildScheduledEventViewModel.class, context, (Function1) null, new PreviewGuildScheduledEventViewModel$startVoiceEvent$1(this), (Function0) null, (Function0) null, new PreviewGuildScheduledEventViewModel$startVoiceEvent$2(this, function0), 52, (Object) null);
}
}
public final ViewState getCurrentViewState() { public final ViewState getCurrentViewState() {
return this.currentViewState; return this.currentViewState;
} }
@ -313,13 +316,10 @@ public final class PreviewGuildScheduledEventViewModel extends AppViewModel<View
createEvent(context, function0); createEvent(context, function0);
} else if (existingEventData.getAction() == WidgetPreviewGuildScheduledEvent.Companion.Action.EDIT_EVENT) { } else if (existingEventData.getAction() == WidgetPreviewGuildScheduledEvent.Companion.Action.EDIT_EVENT) {
editEvent(context, function0); editEvent(context, function0);
} else if (this.eventModel.getEntityType().ordinal() != 1) {
startEvent(context, function0);
} else { } else {
int ordinal = this.eventModel.getEntityType().ordinal(); startStageEvent(context, z2, function0);
if (ordinal == 1) {
startStageEvent(context, z2, function0);
} else if (ordinal == 2) {
startVoiceEvent(context, function0);
}
} }
} }
} }

View file

@ -0,0 +1,47 @@
package com.discord.widgets.guildscheduledevent;
import android.content.Context;
import com.discord.utilities.rx.ObservableExtensionsKt;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetGuildScheduledEventDetailsBottomSheet.kt */
public final class WidgetGuildScheduledEventDetailsBottomSheet$configureUi$7 extends o implements Function0<Unit> {
public final /* synthetic */ WidgetGuildScheduledEventDetailsBottomSheet this$0;
/* compiled from: WidgetGuildScheduledEventDetailsBottomSheet.kt */
/* renamed from: com.discord.widgets.guildscheduledevent.WidgetGuildScheduledEventDetailsBottomSheet$configureUi$7$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function1<Unit, Unit> {
public static final AnonymousClass1 INSTANCE = new AnonymousClass1();
public AnonymousClass1() {
super(1);
}
/* 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(Unit unit) {
invoke(unit);
return Unit.a;
}
public final void invoke(Unit unit) {
m.checkNotNullParameter(unit, "it");
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetGuildScheduledEventDetailsBottomSheet$configureUi$7(WidgetGuildScheduledEventDetailsBottomSheet widgetGuildScheduledEventDetailsBottomSheet) {
super(0);
this.this$0 = widgetGuildScheduledEventDetailsBottomSheet;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(GuildScheduledEventAPI.INSTANCE.endEvent(WidgetGuildScheduledEventDetailsBottomSheet.access$getGuildScheduledEventId$p(this.this$0)), false, 1, null), this.this$0.getClass(), (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, AnonymousClass1.INSTANCE, 62, (Object) null);
}
}

View file

@ -135,7 +135,7 @@ public final class WidgetGuildScheduledEventDetailsBottomSheet extends AppBottom
GuildScheduledEventBottomButtonView guildScheduledEventBottomButtonView = getBinding().b; GuildScheduledEventBottomButtonView guildScheduledEventBottomButtonView = getBinding().b;
d0.z.d.m.checkNotNullExpressionValue(guildScheduledEventBottomButtonView, "binding.guildScheduledEventDetailsButtonView"); d0.z.d.m.checkNotNullExpressionValue(guildScheduledEventBottomButtonView, "binding.guildScheduledEventDetailsButtonView");
guildScheduledEventBottomButtonView.setVisibility(0); guildScheduledEventBottomButtonView.setVisibility(0);
getBinding().b.configureForDetails(initialized.getGuildScheduledEvent(), initialized.isRsvped(), initialized.getCanShare(), initialized.getCanStartEvent(), initialized.isDeveloperMode(), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$2(this, viewState), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$3(this), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$4(this, viewState), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$5(this, viewState), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$6(this, viewState)); getBinding().b.configureForDetails(initialized.getGuildScheduledEvent(), initialized.isRsvped(), initialized.getCanShare(), initialized.getCanStartEvent(), initialized.isDeveloperMode(), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$2(this, viewState), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$3(this), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$4(this, viewState), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$5(this, viewState), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$6(this, viewState), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$7(this));
} }
private final long getGuildScheduledEventId() { private final long getGuildScheduledEventId() {

View file

@ -11,6 +11,7 @@ import c.a.d.f0;
import c.a.d.h0; import c.a.d.h0;
import c.d.b.a.a; import c.d.b.a.a;
import com.discord.R; import com.discord.R;
import com.discord.api.guildscheduledevent.GuildScheduledEventEntityType;
import com.discord.app.AppBottomSheet; import com.discord.app.AppBottomSheet;
import com.discord.databinding.WidgetGuildScheduledEventDetailsExtrasBottomSheetBinding; import com.discord.databinding.WidgetGuildScheduledEventDetailsExtrasBottomSheetBinding;
import com.discord.utilities.guildscheduledevent.GuildScheduledEventTiming; import com.discord.utilities.guildscheduledevent.GuildScheduledEventTiming;
@ -114,7 +115,7 @@ public final class WidgetGuildScheduledEventDetailsExtrasBottomSheet extends App
boolean z3 = eventTiming == GuildScheduledEventTiming.LIVE; boolean z3 = eventTiming == GuildScheduledEventTiming.LIVE;
TextView textView4 = getBinding().e; TextView textView4 = getBinding().e;
m.checkNotNullExpressionValue(textView4, "binding.endEvent"); m.checkNotNullExpressionValue(textView4, "binding.endEvent");
textView4.setVisibility(canStartEvent && z3 ? 0 : 8); textView4.setVisibility(canStartEvent && z3 && initialized.getGuildScheduledEvent().e() != GuildScheduledEventEntityType.EXTERNAL ? 0 : 8);
getBinding().e.setOnClickListener(new WidgetGuildScheduledEventDetailsExtrasBottomSheet$configureUi$4(this)); getBinding().e.setOnClickListener(new WidgetGuildScheduledEventDetailsExtrasBottomSheet$configureUi$4(this));
TextView textView5 = getBinding().b; TextView textView5 = getBinding().b;
m.checkNotNullExpressionValue(textView5, "binding.cancelEvent"); m.checkNotNullExpressionValue(textView5, "binding.cancelEvent");

View file

@ -166,13 +166,13 @@ public final class WidgetGuildScheduledEventLocationSelect extends AppFragment {
this.currentViewState = valid; this.currentViewState = valid;
CheckedSetting checkedSetting = getBinding().k; CheckedSetting checkedSetting = getBinding().k;
m.checkNotNullExpressionValue(checkedSetting, "binding.stageChannelOption"); m.checkNotNullExpressionValue(checkedSetting, "binding.stageChannelOption");
configureLocationOption(valid, checkedSetting, GuildScheduledEventEntityType.STAGE_INSTANCE, getDisabledMessageForChannelOption(valid.getAvailableStageChannelIds(), valid.getCanChangeEntityType())); configureLocationOption(valid, checkedSetting, GuildScheduledEventEntityType.STAGE_INSTANCE, getDisabledMessageForChannelOption(valid.getAvailableStageChannelIds(), valid.getCanChangeChannel()));
CheckedSetting checkedSetting2 = getBinding().n; CheckedSetting checkedSetting2 = getBinding().n;
m.checkNotNullExpressionValue(checkedSetting2, "binding.voiceChannelOption"); m.checkNotNullExpressionValue(checkedSetting2, "binding.voiceChannelOption");
configureLocationOption(valid, checkedSetting2, GuildScheduledEventEntityType.VOICE, getDisabledMessageForChannelOption(valid.getAvailableVoiceChannelIds(), valid.getCanChangeEntityType())); configureLocationOption(valid, checkedSetting2, GuildScheduledEventEntityType.VOICE, getDisabledMessageForChannelOption(valid.getAvailableVoiceChannelIds(), valid.getCanChangeChannel()));
CheckedSetting checkedSetting3 = getBinding().h; CheckedSetting checkedSetting3 = getBinding().h;
m.checkNotNullExpressionValue(checkedSetting3, "binding.externalOption"); m.checkNotNullExpressionValue(checkedSetting3, "binding.externalOption");
configureLocationOption(valid, checkedSetting3, GuildScheduledEventEntityType.EXTERNAL, getDisabledMessageForExternalOption(valid.getCanCreateExternalEvent(), valid.getCanChangeEntityType())); configureLocationOption(valid, checkedSetting3, GuildScheduledEventEntityType.EXTERNAL, getDisabledMessageForExternalOption(valid.getCanCreateExternalEvent(), valid.getCanChangeChannel()));
CheckedSetting checkedSetting4 = getBinding().h; CheckedSetting checkedSetting4 = getBinding().h;
m.checkNotNullExpressionValue(checkedSetting4, "binding.externalOption"); m.checkNotNullExpressionValue(checkedSetting4, "binding.externalOption");
FreeFormEventsFeatureFlag.Companion companion = FreeFormEventsFeatureFlag.Companion; FreeFormEventsFeatureFlag.Companion companion = FreeFormEventsFeatureFlag.Companion;
@ -220,8 +220,9 @@ public final class WidgetGuildScheduledEventLocationSelect extends AppFragment {
textInputLayout6.setVisibility(0); textInputLayout6.setVisibility(0);
} }
TextInputEditText textInputEditText = getBinding().b; TextInputEditText textInputEditText = getBinding().b;
Editable text = textInputEditText.getText();
String str = null; String str = null;
ViewExtensions.setEnabledAndAlpha$default(textInputEditText, valid.getCanChangeChannel(), 0.0f, 2, null);
Editable text = textInputEditText.getText();
String obj = text != null ? text.toString() : null; String obj = text != null ? text.toString() : null;
Channel selectedChannel = valid.getSelectedChannel(); Channel selectedChannel = valid.getSelectedChannel();
if (!m.areEqual(obj, selectedChannel != null ? selectedChannel.m() : null)) { if (!m.areEqual(obj, selectedChannel != null ? selectedChannel.m() : null)) {

View file

@ -18,7 +18,9 @@ import com.discord.stores.StorePermissions;
import com.discord.stores.StoreStream; import com.discord.stores.StoreStream;
import com.discord.stores.updates.ObservationDeck; import com.discord.stores.updates.ObservationDeck;
import com.discord.stores.updates.ObservationDeckProvider; import com.discord.stores.updates.ObservationDeckProvider;
import com.discord.utilities.guildscheduledevent.GuildScheduledEventTiming;
import com.discord.utilities.guildscheduledevent.GuildScheduledEventUtilities; import com.discord.utilities.guildscheduledevent.GuildScheduledEventUtilities;
import com.discord.utilities.guildscheduledevent.GuildScheduledEventUtilitiesKt;
import com.discord.utilities.rx.ObservableExtensionsKt; import com.discord.utilities.rx.ObservableExtensionsKt;
import d0.z.d.m; import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
@ -230,7 +232,7 @@ public final class WidgetGuildScheduledEventLocationSelectViewModel extends AppV
private final Map<Long, Channel> availableChannels; private final Map<Long, Channel> availableChannels;
private final Set<Long> availableStageChannelIds; private final Set<Long> availableStageChannelIds;
private final Set<Long> availableVoiceChannelIds; private final Set<Long> availableVoiceChannelIds;
private final boolean canChangeEntityType; private final boolean canChangeChannel;
private final boolean canCreateExternalEvent; private final boolean canCreateExternalEvent;
private final String externalLocation; private final String externalLocation;
private final Channel selectedChannel; private final Channel selectedChannel;
@ -253,11 +255,11 @@ public final class WidgetGuildScheduledEventLocationSelectViewModel extends AppV
this.availableStageChannelIds = set2; this.availableStageChannelIds = set2;
this.canCreateExternalEvent = z2; this.canCreateExternalEvent = z2;
this.showStageOptionIfUnavailable = z3; this.showStageOptionIfUnavailable = z3;
this.canChangeEntityType = z4; this.canChangeChannel = z4;
} }
public static /* synthetic */ Valid copy$default(Valid valid, GuildScheduledEventEntityType guildScheduledEventEntityType, Channel channel, String str, Map map, Set set, Set set2, boolean z2, boolean z3, boolean z4, int i, Object obj) { public static /* synthetic */ Valid copy$default(Valid valid, GuildScheduledEventEntityType guildScheduledEventEntityType, Channel channel, String str, Map map, Set set, Set set2, boolean z2, boolean z3, boolean z4, int i, Object obj) {
return valid.copy((i & 1) != 0 ? valid.selectedLocationOption : guildScheduledEventEntityType, (i & 2) != 0 ? valid.selectedChannel : channel, (i & 4) != 0 ? valid.externalLocation : str, (i & 8) != 0 ? valid.availableChannels : map, (i & 16) != 0 ? valid.availableVoiceChannelIds : set, (i & 32) != 0 ? valid.availableStageChannelIds : set2, (i & 64) != 0 ? valid.canCreateExternalEvent : z2, (i & 128) != 0 ? valid.showStageOptionIfUnavailable : z3, (i & 256) != 0 ? valid.canChangeEntityType : z4); return valid.copy((i & 1) != 0 ? valid.selectedLocationOption : guildScheduledEventEntityType, (i & 2) != 0 ? valid.selectedChannel : channel, (i & 4) != 0 ? valid.externalLocation : str, (i & 8) != 0 ? valid.availableChannels : map, (i & 16) != 0 ? valid.availableVoiceChannelIds : set, (i & 32) != 0 ? valid.availableStageChannelIds : set2, (i & 64) != 0 ? valid.canCreateExternalEvent : z2, (i & 128) != 0 ? valid.showStageOptionIfUnavailable : z3, (i & 256) != 0 ? valid.canChangeChannel : z4);
} }
public final GuildScheduledEventEntityType component1() { public final GuildScheduledEventEntityType component1() {
@ -293,7 +295,7 @@ public final class WidgetGuildScheduledEventLocationSelectViewModel extends AppV
} }
public final boolean component9() { public final boolean component9() {
return this.canChangeEntityType; return this.canChangeChannel;
} }
public final Valid copy(GuildScheduledEventEntityType guildScheduledEventEntityType, Channel channel, String str, Map<Long, Channel> map, Set<Long> set, Set<Long> set2, boolean z2, boolean z3, boolean z4) { public final Valid copy(GuildScheduledEventEntityType guildScheduledEventEntityType, Channel channel, String str, Map<Long, Channel> map, Set<Long> set, Set<Long> set2, boolean z2, boolean z3, boolean z4) {
@ -313,7 +315,7 @@ public final class WidgetGuildScheduledEventLocationSelectViewModel extends AppV
return false; return false;
} }
Valid valid = (Valid) obj; Valid valid = (Valid) obj;
return m.areEqual(this.selectedLocationOption, valid.selectedLocationOption) && m.areEqual(this.selectedChannel, valid.selectedChannel) && m.areEqual(this.externalLocation, valid.externalLocation) && m.areEqual(this.availableChannels, valid.availableChannels) && m.areEqual(this.availableVoiceChannelIds, valid.availableVoiceChannelIds) && m.areEqual(this.availableStageChannelIds, valid.availableStageChannelIds) && this.canCreateExternalEvent == valid.canCreateExternalEvent && this.showStageOptionIfUnavailable == valid.showStageOptionIfUnavailable && this.canChangeEntityType == valid.canChangeEntityType; return m.areEqual(this.selectedLocationOption, valid.selectedLocationOption) && m.areEqual(this.selectedChannel, valid.selectedChannel) && m.areEqual(this.externalLocation, valid.externalLocation) && m.areEqual(this.availableChannels, valid.availableChannels) && m.areEqual(this.availableVoiceChannelIds, valid.availableVoiceChannelIds) && m.areEqual(this.availableStageChannelIds, valid.availableStageChannelIds) && this.canCreateExternalEvent == valid.canCreateExternalEvent && this.showStageOptionIfUnavailable == valid.showStageOptionIfUnavailable && this.canChangeChannel == valid.canChangeChannel;
} }
public final Map<Long, Channel> getAvailableChannels() { public final Map<Long, Channel> getAvailableChannels() {
@ -328,8 +330,8 @@ public final class WidgetGuildScheduledEventLocationSelectViewModel extends AppV
return this.availableVoiceChannelIds; return this.availableVoiceChannelIds;
} }
public final boolean getCanChangeEntityType() { public final boolean getCanChangeChannel() {
return this.canChangeEntityType; return this.canChangeChannel;
} }
public final boolean getCanCreateExternalEvent() { public final boolean getCanCreateExternalEvent() {
@ -386,7 +388,7 @@ public final class WidgetGuildScheduledEventLocationSelectViewModel extends AppV
int i9 = z3 ? 1 : 0; int i9 = z3 ? 1 : 0;
int i10 = z3 ? 1 : 0; int i10 = z3 ? 1 : 0;
int i11 = (i7 + i8) * 31; int i11 = (i7 + i8) * 31;
boolean z4 = this.canChangeEntityType; boolean z4 = this.canChangeChannel;
if (!z4) { if (!z4) {
i3 = z4 ? 1 : 0; i3 = z4 ? 1 : 0;
} }
@ -410,8 +412,8 @@ public final class WidgetGuildScheduledEventLocationSelectViewModel extends AppV
P.append(this.canCreateExternalEvent); P.append(this.canCreateExternalEvent);
P.append(", showStageOptionIfUnavailable="); P.append(", showStageOptionIfUnavailable=");
P.append(this.showStageOptionIfUnavailable); P.append(this.showStageOptionIfUnavailable);
P.append(", canChangeEntityType="); P.append(", canChangeChannel=");
return a.L(P, this.canChangeEntityType, ")"); return a.L(P, this.canChangeChannel, ")");
} }
} }
@ -462,19 +464,21 @@ public final class WidgetGuildScheduledEventLocationSelectViewModel extends AppV
/* JADX WARNING: Removed duplicated region for block: B:46:0x00f6 */ /* JADX WARNING: Removed duplicated region for block: B:46:0x00f6 */
/* JADX WARNING: Removed duplicated region for block: B:55:0x010e */ /* JADX WARNING: Removed duplicated region for block: B:55:0x010e */
/* JADX WARNING: Removed duplicated region for block: B:60:0x0120 */ /* JADX WARNING: Removed duplicated region for block: B:60:0x0120 */
/* JADX WARNING: Removed duplicated region for block: B:61:0x0125 A[ADDED_TO_REGION] */ /* JADX WARNING: Removed duplicated region for block: B:61:0x0125 */
/* JADX WARNING: Removed duplicated region for block: B:70:0x013d */ /* JADX WARNING: Removed duplicated region for block: B:70:0x013e */
/* JADX WARNING: Removed duplicated region for block: B:71:0x013f */ /* JADX WARNING: Removed duplicated region for block: B:79:0x0156 */
@MainThread @MainThread
private final void handleStoreState(StoreState storeState) { private final void handleStoreState(StoreState storeState) {
Long l; Long l;
GuildScheduledEventEntityType selectedLocationOption; GuildScheduledEventEntityType selectedLocationOption;
String externalLocation;
boolean z2;
GuildScheduledEvent existingGuildScheduledEvent; GuildScheduledEvent existingGuildScheduledEvent;
GuildScheduledEventEntityMetadata d; GuildScheduledEventEntityMetadata d;
Set<GuildFeature> features; Set<GuildFeature> features;
this.currentStoreState = storeState; this.currentStoreState = storeState;
ViewState viewState = getViewState(); ViewState viewState = getViewState();
String str = null; GuildScheduledEventTiming guildScheduledEventTiming = null;
if (!(viewState instanceof ViewState.Valid)) { if (!(viewState instanceof ViewState.Valid)) {
viewState = null; viewState = null;
} }
@ -497,7 +501,7 @@ public final class WidgetGuildScheduledEventLocationSelectViewModel extends AppV
hashSet.add(Long.valueOf(channel.h())); hashSet.add(Long.valueOf(channel.h()));
} }
} }
boolean z2 = this.existingGuildScheduledEventId != null; boolean z3 = this.existingGuildScheduledEventId != null;
if (valid != null) { if (valid != null) {
Channel selectedChannel = valid.getSelectedChannel(); Channel selectedChannel = valid.getSelectedChannel();
if (selectedChannel != null) { if (selectedChannel != null) {
@ -513,18 +517,30 @@ public final class WidgetGuildScheduledEventLocationSelectViewModel extends AppV
} }
Guild guild = storeState.getGuild(); Guild guild = storeState.getGuild();
boolean contains = (guild != null || (features = guild.getFeatures()) == null) ? false : features.contains(GuildFeature.COMMUNITY); boolean contains = (guild != null || (features = guild.getFeatures()) == null) ? false : features.contains(GuildFeature.COMMUNITY);
if (valid != null) { externalLocation = valid != null ? valid.getExternalLocation() : (!z3 || l != null || (existingGuildScheduledEvent = storeState.getExistingGuildScheduledEvent()) == null || (d = existingGuildScheduledEvent.d()) == null) ? null : d.a();
str = valid.getExternalLocation(); if (z3) {
} else if (z2 && l == null && (existingGuildScheduledEvent = storeState.getExistingGuildScheduledEvent()) != null && (d = existingGuildScheduledEvent.d()) != null) { GuildScheduledEvent existingGuildScheduledEvent2 = storeState.getExistingGuildScheduledEvent();
str = d.a(); if (existingGuildScheduledEvent2 != null) {
guildScheduledEventTiming = GuildScheduledEventUtilitiesKt.getEventTiming(existingGuildScheduledEvent2);
}
if (guildScheduledEventTiming == GuildScheduledEventTiming.LIVE) {
z2 = false;
if (externalLocation == null) {
externalLocation = "";
}
updateViewState(new ViewState.Valid(selectedLocationOption, channel2, externalLocation, linkedHashMap, hashSet2, hashSet, canCreateExternalEvent, contains, z2));
}
} }
updateViewState(new ViewState.Valid(selectedLocationOption, channel2, str != null ? str : "", linkedHashMap, hashSet2, hashSet, canCreateExternalEvent, contains, !z2)); z2 = true;
if (externalLocation == null) {
}
updateViewState(new ViewState.Valid(selectedLocationOption, channel2, externalLocation, linkedHashMap, hashSet2, hashSet, canCreateExternalEvent, contains, z2));
} }
} else { } else {
if (z2) { if (z3) {
GuildScheduledEvent existingGuildScheduledEvent2 = storeState.getExistingGuildScheduledEvent(); GuildScheduledEvent existingGuildScheduledEvent3 = storeState.getExistingGuildScheduledEvent();
if (existingGuildScheduledEvent2 != null) { if (existingGuildScheduledEvent3 != null) {
l = existingGuildScheduledEvent2.b(); l = existingGuildScheduledEvent3.b();
} }
} else { } else {
l = this.initialChannelId; l = this.initialChannelId;
@ -542,7 +558,12 @@ public final class WidgetGuildScheduledEventLocationSelectViewModel extends AppV
} }
if (valid != null) { if (valid != null) {
} }
updateViewState(new ViewState.Valid(selectedLocationOption, channel2, str != null ? str : "", linkedHashMap, hashSet2, hashSet, canCreateExternalEvent, contains, !z2)); if (z3) {
}
z2 = true;
if (externalLocation == null) {
}
updateViewState(new ViewState.Valid(selectedLocationOption, channel2, externalLocation, linkedHashMap, hashSet2, hashSet, canCreateExternalEvent, contains, z2));
} }
l = null; l = null;
Channel channel2 = (Channel) linkedHashMap.get(l); Channel channel2 = (Channel) linkedHashMap.get(l);
@ -558,7 +579,12 @@ public final class WidgetGuildScheduledEventLocationSelectViewModel extends AppV
} }
if (valid != null) { if (valid != null) {
} }
updateViewState(new ViewState.Valid(selectedLocationOption, channel2, str != null ? str : "", linkedHashMap, hashSet2, hashSet, canCreateExternalEvent, contains, !z2)); if (z3) {
}
z2 = true;
if (externalLocation == null) {
}
updateViewState(new ViewState.Valid(selectedLocationOption, channel2, externalLocation, linkedHashMap, hashSet2, hashSet, canCreateExternalEvent, contains, z2));
} }
public final StoreState getCurrentStoreState() { public final StoreState getCurrentStoreState() {

View file

@ -4,6 +4,7 @@ import android.app.DatePickerDialog;
import android.content.Context; import android.content.Context;
import android.view.View; import android.view.View;
import android.widget.DatePicker; import android.widget.DatePicker;
import com.discord.utilities.time.ClockFactory;
import com.discord.widgets.guildscheduledevent.GuildScheduledEventSettingsViewModel; import com.discord.widgets.guildscheduledevent.GuildScheduledEventSettingsViewModel;
import d0.z.d.m; import d0.z.d.m;
/* compiled from: WidgetGuildScheduledEventSettings.kt */ /* compiled from: WidgetGuildScheduledEventSettings.kt */
@ -30,7 +31,7 @@ public final class WidgetGuildScheduledEventSettings$onViewBound$7 implements Vi
DatePickerDialog datePickerDialog = new DatePickerDialog(requireContext, widgetGuildScheduledEventSettings$onViewBound$7$$special$$inlined$let$lambda$1, year, month, endDate3 != null ? endDate3.getDayOfMonth() : first.getDayOfMonth()); DatePickerDialog datePickerDialog = new DatePickerDialog(requireContext, widgetGuildScheduledEventSettings$onViewBound$7$$special$$inlined$let$lambda$1, year, month, endDate3 != null ? endDate3.getDayOfMonth() : first.getDayOfMonth());
DatePicker datePicker = datePickerDialog.getDatePicker(); DatePicker datePicker = datePickerDialog.getDatePicker();
m.checkNotNullExpressionValue(datePicker, "datePicker"); m.checkNotNullExpressionValue(datePicker, "datePicker");
datePicker.setMinDate(eventModel.getStartDate().toMillis()); datePicker.setMinDate(Math.max(eventModel.getStartDate().toMillis(), ClockFactory.get().currentTimeMillis()));
datePickerDialog.show(); datePickerDialog.show();
} }
} }

View file

@ -18,10 +18,12 @@ public final class WidgetGuildScheduledEventSettings$onViewBound$8 implements Vi
if (access$getCurrentViewState$p == null) { if (access$getCurrentViewState$p == null) {
return; return;
} }
if (!WidgetGuildScheduledEventSettings.access$getViewModel$p(this.this$0).isStartDateBeforeEndDate(access$getCurrentViewState$p)) { if (WidgetGuildScheduledEventSettings.access$getViewModel$p(this.this$0).hasStartTimeChanged(access$getCurrentViewState$p) && !WidgetGuildScheduledEventSettings.access$getViewModel$p(this.this$0).isDateInFuture(access$getCurrentViewState$p.getEventModel().getStartDate(), access$getCurrentViewState$p.getEventModel().getStartTime())) {
WidgetGuildScheduledEventSettings.access$showDateErrorToast(this.this$0, GuildScheduledEventSettingsViewModel.DateError.END_DATE_BEFORE_START_DATE);
} else if (!WidgetGuildScheduledEventSettings.access$getViewModel$p(this.this$0).isDateInFuture(access$getCurrentViewState$p.getEventModel().getStartDate(), access$getCurrentViewState$p.getEventModel().getStartTime())) {
WidgetGuildScheduledEventSettings.access$showDateErrorToast(this.this$0, GuildScheduledEventSettingsViewModel.DateError.START_DATE_IN_PAST); WidgetGuildScheduledEventSettings.access$showDateErrorToast(this.this$0, GuildScheduledEventSettingsViewModel.DateError.START_DATE_IN_PAST);
} else if (WidgetGuildScheduledEventSettings.access$getViewModel$p(this.this$0).hasEndTimeChanged(access$getCurrentViewState$p) && !WidgetGuildScheduledEventSettings.access$getViewModel$p(this.this$0).isDateInFuture(access$getCurrentViewState$p.getEventModel().getEndDate(), access$getCurrentViewState$p.getEventModel().getEndTime())) {
WidgetGuildScheduledEventSettings.access$showDateErrorToast(this.this$0, GuildScheduledEventSettingsViewModel.DateError.END_DATE_IN_PAST);
} else if (!WidgetGuildScheduledEventSettings.access$getViewModel$p(this.this$0).isStartDateBeforeEndDate(access$getCurrentViewState$p)) {
WidgetGuildScheduledEventSettings.access$showDateErrorToast(this.this$0, GuildScheduledEventSettingsViewModel.DateError.END_DATE_BEFORE_START_DATE);
} else { } else {
WidgetPreviewGuildScheduledEvent.Companion companion = WidgetPreviewGuildScheduledEvent.Companion; WidgetPreviewGuildScheduledEvent.Companion companion = WidgetPreviewGuildScheduledEvent.Companion;
Context requireContext = this.this$0.requireContext(); Context requireContext = this.this$0.requireContext();

View file

@ -16,10 +16,14 @@ import c.a.d.j;
import c.a.k.b; import c.a.k.b;
import c.d.b.a.a; import c.d.b.a.a;
import com.discord.R; import com.discord.R;
import com.discord.api.guildscheduledevent.GuildScheduledEvent;
import com.discord.api.guildscheduledevent.GuildScheduledEventEntityType; import com.discord.api.guildscheduledevent.GuildScheduledEventEntityType;
import com.discord.app.AppFragment; import com.discord.app.AppFragment;
import com.discord.databinding.WidgetGuildScheduledEventSettingsBinding; import com.discord.databinding.WidgetGuildScheduledEventSettingsBinding;
import com.discord.utilities.guildscheduledevent.GuildScheduledEventTiming;
import com.discord.utilities.guildscheduledevent.GuildScheduledEventUtilitiesKt;
import com.discord.utilities.rx.ObservableExtensionsKt; import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.utilities.view.extensions.ViewExtensions;
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate; import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt; import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
import com.discord.widgets.guildscheduledevent.GuildScheduledEventSettingsViewModel; import com.discord.widgets.guildscheduledevent.GuildScheduledEventSettingsViewModel;
@ -196,8 +200,14 @@ public final class WidgetGuildScheduledEventSettings extends AppFragment {
private final void configureStartDateTime(GuildScheduledEventSettingsViewModel.ViewState.Initialized initialized) { private final void configureStartDateTime(GuildScheduledEventSettingsViewModel.ViewState.Initialized initialized) {
long millis = GuildScheduledEventPickerDateTime.INSTANCE.toMillis(initialized.getEventModel().getStartDate(), initialized.getEventModel().getStartTime()); long millis = GuildScheduledEventPickerDateTime.INSTANCE.toMillis(initialized.getEventModel().getStartDate(), initialized.getEventModel().getStartTime());
getBinding().k.setText(new SimpleDateFormat("MMM dd, yyyy", Locale.getDefault()).format(Long.valueOf(millis))); GuildScheduledEvent existingEvent = initialized.getExistingEvent();
getBinding().l.setText(new SimpleDateFormat("h:mm a", Locale.getDefault()).format(Long.valueOf(millis))); boolean z2 = (existingEvent != null ? GuildScheduledEventUtilitiesKt.getEventTiming(existingEvent) : null) == GuildScheduledEventTiming.LIVE;
TextInputEditText textInputEditText = getBinding().k;
ViewExtensions.setEnabledAndAlpha$default(textInputEditText, !z2, 0.0f, 2, null);
textInputEditText.setText(new SimpleDateFormat("MMM dd, yyyy", Locale.getDefault()).format(Long.valueOf(millis)));
TextInputEditText textInputEditText2 = getBinding().l;
ViewExtensions.setEnabledAndAlpha$default(textInputEditText2, !z2, 0.0f, 2, null);
textInputEditText2.setText(new SimpleDateFormat("h:mm a", Locale.getDefault()).format(Long.valueOf(millis)));
} }
private final void configureUi(GuildScheduledEventSettingsViewModel.ViewState viewState) { private final void configureUi(GuildScheduledEventSettingsViewModel.ViewState viewState) {

View file

@ -18,6 +18,6 @@ public final class WidgetPreviewGuildScheduledEvent$viewModel$2 extends o implem
@Override // kotlin.jvm.functions.Function0 @Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */ /* renamed from: invoke */
public final AppViewModel<PreviewGuildScheduledEventViewModel.ViewState> mo1invoke() { public final AppViewModel<PreviewGuildScheduledEventViewModel.ViewState> mo1invoke() {
return new PreviewGuildScheduledEventViewModel(WidgetPreviewGuildScheduledEvent.access$getEventModel$p(this.this$0), (WidgetPreviewGuildScheduledEvent.Companion.ExistingEventData) this.this$0.getMostRecentIntent().getSerializableExtra("INTENT_EXTRA_EXISTING_EVENT_DATA"), null, null, 12, null); return new PreviewGuildScheduledEventViewModel(WidgetPreviewGuildScheduledEvent.access$getEventModel$p(this.this$0), (WidgetPreviewGuildScheduledEvent.Companion.ExistingEventData) this.this$0.getMostRecentIntent().getSerializableExtra("INTENT_EXTRA_EXISTING_EVENT_DATA"), null, null, null, 28, null);
} }
} }

View file

@ -2,8 +2,12 @@ package com.discord.widgets.nux;
import c.a.k.b; import c.a.k.b;
import com.discord.R; import com.discord.R;
import com.discord.analytics.generated.events.network_action.TrackNetworkActionChannelCreate;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.api.channel.Channel; import com.discord.api.channel.Channel;
import com.discord.api.permission.PermissionOverwrite;
import com.discord.restapi.RestAPIParams; import com.discord.restapi.RestAPIParams;
import com.discord.stores.utilities.RestCallStateKt;
import com.discord.utilities.error.Error; import com.discord.utilities.error.Error;
import com.discord.utilities.rest.RestAPI; import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt; import com.discord.utilities.rx.ObservableExtensionsKt;
@ -11,6 +15,7 @@ import com.discord.utilities.view.extensions.ViewExtensions;
import com.google.android.material.textfield.TextInputLayout; import com.google.android.material.textfield.TextInputLayout;
import d0.z.d.m; import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import java.util.List;
import kotlin.Unit; import kotlin.Unit;
import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function1;
import rx.functions.Action1; import rx.functions.Action1;
@ -21,7 +26,7 @@ public final class WidgetNuxChannelPrompt$handleSubmit$1 extends o implements Fu
/* compiled from: WidgetNuxChannelPrompt.kt */ /* compiled from: WidgetNuxChannelPrompt.kt */
/* renamed from: com.discord.widgets.nux.WidgetNuxChannelPrompt$handleSubmit$1$1 reason: invalid class name */ /* renamed from: com.discord.widgets.nux.WidgetNuxChannelPrompt$handleSubmit$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function1<Channel, Unit> { public static final class AnonymousClass1 extends o implements Function1<Channel, TrackNetworkMetadataReceiver> {
public final /* synthetic */ WidgetNuxChannelPrompt$handleSubmit$1 this$0; public final /* synthetic */ WidgetNuxChannelPrompt$handleSubmit$1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
@ -30,6 +35,23 @@ public final class WidgetNuxChannelPrompt$handleSubmit$1 extends o implements Fu
this.this$0 = widgetNuxChannelPrompt$handleSubmit$1; this.this$0 = widgetNuxChannelPrompt$handleSubmit$1;
} }
public final TrackNetworkMetadataReceiver invoke(Channel channel) {
List<PermissionOverwrite> s2;
return new TrackNetworkActionChannelCreate((channel == null || (s2 = channel.s()) == null) ? null : Boolean.valueOf(!s2.isEmpty()), channel != null ? Long.valueOf((long) channel.A()) : null, channel != null ? Long.valueOf(channel.h()) : null, channel != null ? Long.valueOf(channel.r()) : null, Long.valueOf(this.this$0.$guildId));
}
}
/* compiled from: WidgetNuxChannelPrompt.kt */
/* renamed from: com.discord.widgets.nux.WidgetNuxChannelPrompt$handleSubmit$1$2 reason: invalid class name */
public static final class AnonymousClass2 extends o implements Function1<Channel, Unit> {
public final /* synthetic */ WidgetNuxChannelPrompt$handleSubmit$1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass2(WidgetNuxChannelPrompt$handleSubmit$1 widgetNuxChannelPrompt$handleSubmit$1) {
super(1);
this.this$0 = widgetNuxChannelPrompt$handleSubmit$1;
}
/* Return type fixed from 'java.lang.Object' to match base method */ /* 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] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1 @Override // kotlin.jvm.functions.Function1
@ -45,11 +67,11 @@ public final class WidgetNuxChannelPrompt$handleSubmit$1 extends o implements Fu
} }
/* compiled from: WidgetNuxChannelPrompt.kt */ /* compiled from: WidgetNuxChannelPrompt.kt */
/* renamed from: com.discord.widgets.nux.WidgetNuxChannelPrompt$handleSubmit$1$2 reason: invalid class name */ /* renamed from: com.discord.widgets.nux.WidgetNuxChannelPrompt$handleSubmit$1$3 reason: invalid class name */
public static final class AnonymousClass2<T> implements Action1<Error> { public static final class AnonymousClass3<T> implements Action1<Error> {
public final /* synthetic */ WidgetNuxChannelPrompt$handleSubmit$1 this$0; public final /* synthetic */ WidgetNuxChannelPrompt$handleSubmit$1 this$0;
public AnonymousClass2(WidgetNuxChannelPrompt$handleSubmit$1 widgetNuxChannelPrompt$handleSubmit$1) { public AnonymousClass3(WidgetNuxChannelPrompt$handleSubmit$1 widgetNuxChannelPrompt$handleSubmit$1) {
this.this$0 = widgetNuxChannelPrompt$handleSubmit$1; this.this$0 = widgetNuxChannelPrompt$handleSubmit$1;
} }
@ -83,6 +105,6 @@ public final class WidgetNuxChannelPrompt$handleSubmit$1 extends o implements Fu
TextInputLayout textInputLayout = WidgetNuxChannelPrompt.access$getBinding$p(this.this$0).g; TextInputLayout textInputLayout = WidgetNuxChannelPrompt.access$getBinding$p(this.this$0).g;
m.checkNotNullExpressionValue(textInputLayout, "binding.nufChannelPromptTopicWrap"); m.checkNotNullExpressionValue(textInputLayout, "binding.nufChannelPromptTopicWrap");
String textOrEmpty = ViewExtensions.getTextOrEmpty(textInputLayout); String textOrEmpty = ViewExtensions.getTextOrEmpty(textInputLayout);
ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().createGuildChannel(this.$guildId, new RestAPIParams.CreateGuildChannel(0, null, textOrEmpty, Long.valueOf(channel.r()), null, b.k(this.this$0, R.string.nuf_channel_prompt_channel_topic_template, new Object[]{textOrEmpty}, null, 4).toString())), false, 1, null), this.this$0, null, 2, null).k(c.a.d.o.a.g(this.this$0.requireContext(), new AnonymousClass1(this), new AnonymousClass2(this))); ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestCallStateKt.logNetworkAction(RestAPI.Companion.getApi().createGuildChannel(this.$guildId, new RestAPIParams.CreateGuildChannel(0, null, textOrEmpty, Long.valueOf(channel.r()), null, b.k(this.this$0, R.string.nuf_channel_prompt_channel_topic_template, new Object[]{textOrEmpty}, null, 4).toString())), new AnonymousClass1(this)), false, 1, null), this.this$0, null, 2, null).k(c.a.d.o.a.g(this.this$0.requireContext(), new AnonymousClass2(this), new AnonymousClass3(this)));
} }
} }

View file

@ -323,7 +323,7 @@ public final class WidgetSettings extends AppFragment implements OnTabSelectedLi
TextView textView = binding.f; TextView textView = binding.f;
m.checkNotNullExpressionValue(textView, "appInfoHeader"); m.checkNotNullExpressionValue(textView, "appInfoHeader");
String string = getString(R.string.app_information); String string = getString(R.string.app_information);
textView.setText(string + " - 94.0 - Alpha (94200)"); textView.setText(string + " - 94.1 - Alpha (94201)");
binding.B.setOnClickListener(new WidgetSettings$onViewBound$$inlined$with$lambda$3(this)); binding.B.setOnClickListener(new WidgetSettings$onViewBound$$inlined$with$lambda$3(this));
binding.u.setOnClickListener(WidgetSettings$onViewBound$1$5.INSTANCE); binding.u.setOnClickListener(WidgetSettings$onViewBound$1$5.INSTANCE);
binding.q.setOnClickListener(WidgetSettings$onViewBound$1$6.INSTANCE); binding.q.setOnClickListener(WidgetSettings$onViewBound$1$6.INSTANCE);

View file

@ -174,7 +174,7 @@ public final class ModeratorStartStageAdapter extends MGRecyclerAdapterSimple<Mo
pair = new Pair(b.h(this.this$0.getContext(), staticOption.getTitleRes(), new Object[0], null, 4), b.h(this.this$0.getContext(), staticOption.getSubtitleRes(), new Object[0], null, 4)); pair = new Pair(b.h(this.this$0.getContext(), staticOption.getTitleRes(), new Object[0], null, 4), b.h(this.this$0.getContext(), staticOption.getSubtitleRes(), new Object[0], null, 4));
} else if (listItem instanceof ModeratorStartStageItem.ListItem.Event) { } else if (listItem instanceof ModeratorStartStageItem.ListItem.Event) {
ModeratorStartStageItem.ListItem.Event event = (ModeratorStartStageItem.ListItem.Event) listItem; ModeratorStartStageItem.ListItem.Event event = (ModeratorStartStageItem.ListItem.Event) listItem;
pair = new Pair(event.getEvent().h(), b.h(this.this$0.getContext(), R.string.guild_event_start_prompt_description, new Object[]{GuildScheduledEventUtilitiesKt.getEventStartingTimeString(event.getEvent(), this.this$0.getContext())}, null, 4)); pair = new Pair(event.getEvent().h(), GuildScheduledEventUtilitiesKt.getEventStartingTimeString(event.getEvent(), this.this$0.getContext()));
} else { } else {
throw new NoWhenBranchMatchedException(); throw new NoWhenBranchMatchedException();
} }

View file

@ -1,16 +1,19 @@
package com.discord.widgets.user.phone; package com.discord.widgets.user.phone;
import com.discord.analytics.generated.events.network_action.TrackNetworkActionUserVerifyPhone;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import com.discord.models.domain.ModelPhoneVerificationToken; import com.discord.models.domain.ModelPhoneVerificationToken;
import rx.functions.Action1; import d0.z.d.o;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetUserPhoneVerify.kt */ /* compiled from: WidgetUserPhoneVerify.kt */
public final class WidgetUserPhoneVerify$handleCodeEntered$1<T> implements Action1<ModelPhoneVerificationToken> { public final class WidgetUserPhoneVerify$handleCodeEntered$1 extends o implements Function1<ModelPhoneVerificationToken, TrackNetworkMetadataReceiver> {
public final /* synthetic */ WidgetUserPhoneVerify this$0; public static final WidgetUserPhoneVerify$handleCodeEntered$1 INSTANCE = new WidgetUserPhoneVerify$handleCodeEntered$1();
public WidgetUserPhoneVerify$handleCodeEntered$1(WidgetUserPhoneVerify widgetUserPhoneVerify) { public WidgetUserPhoneVerify$handleCodeEntered$1() {
this.this$0 = widgetUserPhoneVerify; super(1);
} }
public final void call(ModelPhoneVerificationToken modelPhoneVerificationToken) { public final TrackNetworkMetadataReceiver invoke(ModelPhoneVerificationToken modelPhoneVerificationToken) {
WidgetUserPhoneVerify.access$handleCodeReceived(this.this$0, modelPhoneVerificationToken.component1()); return new TrackNetworkActionUserVerifyPhone();
} }
} }

View file

@ -1,16 +1,16 @@
package com.discord.widgets.user.phone; package com.discord.widgets.user.phone;
import com.discord.utilities.error.Error; import com.discord.models.domain.ModelPhoneVerificationToken;
import rx.functions.Action1; import rx.functions.Action1;
/* compiled from: WidgetUserPhoneVerify.kt */ /* compiled from: WidgetUserPhoneVerify.kt */
public final class WidgetUserPhoneVerify$handleCodeEntered$2<T> implements Action1<Error> { public final class WidgetUserPhoneVerify$handleCodeEntered$2<T> implements Action1<ModelPhoneVerificationToken> {
public final /* synthetic */ WidgetUserPhoneVerify this$0; public final /* synthetic */ WidgetUserPhoneVerify this$0;
public WidgetUserPhoneVerify$handleCodeEntered$2(WidgetUserPhoneVerify widgetUserPhoneVerify) { public WidgetUserPhoneVerify$handleCodeEntered$2(WidgetUserPhoneVerify widgetUserPhoneVerify) {
this.this$0 = widgetUserPhoneVerify; this.this$0 = widgetUserPhoneVerify;
} }
public final void call(Error error) { public final void call(ModelPhoneVerificationToken modelPhoneVerificationToken) {
WidgetUserPhoneVerify.access$getBinding$p(this.this$0).d.b(); WidgetUserPhoneVerify.access$handleCodeReceived(this.this$0, modelPhoneVerificationToken.component1());
} }
} }

Some files were not shown because too many files have changed in this diff Show more