88 lines
4.1 KiB
Java
88 lines
4.1 KiB
Java
package com.discord.stores;
|
|
|
|
import com.discord.models.application.Unread;
|
|
import com.discord.stores.StoreMessageAck;
|
|
import com.discord.stores.StoreStream;
|
|
import d0.z.d.o;
|
|
import j0.k.b;
|
|
import java.util.Map;
|
|
import kotlin.jvm.functions.Function1;
|
|
import rx.Observable;
|
|
import rx.functions.Func3;
|
|
/* compiled from: StoreReadStates.kt */
|
|
public final class StoreReadStates$computeUnreadMarker$1 extends o implements Function1<Long, Observable<Unread.Marker>> {
|
|
public static final StoreReadStates$computeUnreadMarker$1 INSTANCE = new StoreReadStates$computeUnreadMarker$1();
|
|
|
|
/* compiled from: StoreReadStates.kt */
|
|
/* renamed from: com.discord.stores.StoreReadStates$computeUnreadMarker$1$1 reason: invalid class name */
|
|
public static final class AnonymousClass1<T, R> implements b<Map<Long, ? extends StoreMessageAck.Ack>, StoreMessageAck.Ack> {
|
|
public final /* synthetic */ long $channelId;
|
|
|
|
public AnonymousClass1(long j) {
|
|
this.$channelId = j;
|
|
}
|
|
|
|
public final StoreMessageAck.Ack call(Map<Long, StoreMessageAck.Ack> map) {
|
|
return map.get(Long.valueOf(this.$channelId));
|
|
}
|
|
|
|
/* 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 // j0.k.b
|
|
public /* bridge */ /* synthetic */ StoreMessageAck.Ack call(Map<Long, ? extends StoreMessageAck.Ack> map) {
|
|
return call((Map<Long, StoreMessageAck.Ack>) map);
|
|
}
|
|
}
|
|
|
|
/* compiled from: StoreReadStates.kt */
|
|
/* renamed from: com.discord.stores.StoreReadStates$computeUnreadMarker$1$2 reason: invalid class name */
|
|
public static final class AnonymousClass2<T, R> implements b<Map<Long, ? extends StoreMessageAck.Ack>, StoreMessageAck.Ack> {
|
|
public final /* synthetic */ long $channelId;
|
|
|
|
public AnonymousClass2(long j) {
|
|
this.$channelId = j;
|
|
}
|
|
|
|
public final StoreMessageAck.Ack call(Map<Long, StoreMessageAck.Ack> map) {
|
|
return map.get(Long.valueOf(this.$channelId));
|
|
}
|
|
|
|
/* 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 // j0.k.b
|
|
public /* bridge */ /* synthetic */ StoreMessageAck.Ack call(Map<Long, ? extends StoreMessageAck.Ack> map) {
|
|
return call((Map<Long, StoreMessageAck.Ack>) map);
|
|
}
|
|
}
|
|
|
|
/* compiled from: StoreReadStates.kt */
|
|
/* renamed from: com.discord.stores.StoreReadStates$computeUnreadMarker$1$3 reason: invalid class name */
|
|
public static final class AnonymousClass3<T1, T2, T3, R> implements Func3<StoreMessageAck.Ack, StoreMessageAck.Ack, Long, Unread.Marker> {
|
|
public final /* synthetic */ long $channelId;
|
|
|
|
public AnonymousClass3(long j) {
|
|
this.$channelId = j;
|
|
}
|
|
|
|
public final Unread.Marker call(StoreMessageAck.Ack ack, StoreMessageAck.Ack ack2, Long l) {
|
|
return (ack2 == null || !ack2.isLockedAck()) ? ack != null ? new Unread.Marker(this.$channelId, ack.getMessageId(), l) : new Unread.Marker(this.$channelId, 0, l) : new Unread.Marker(this.$channelId, ack2.getMessageId(), l);
|
|
}
|
|
}
|
|
|
|
public StoreReadStates$computeUnreadMarker$1() {
|
|
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 */ Observable<Unread.Marker> invoke(Long l) {
|
|
return invoke(l.longValue());
|
|
}
|
|
|
|
public final Observable<Unread.Marker> invoke(long j) {
|
|
StoreStream.Companion companion = StoreStream.Companion;
|
|
return Observable.i(companion.getMessageAck().observeAll().F(new AnonymousClass1(j)).Z(1), companion.getMessageAck().observeAll().F(new AnonymousClass2(j)), companion.getMessagesMostRecent().observeRecentMessageIds(j).Z(1), new AnonymousClass3(j));
|
|
}
|
|
}
|