2019-07-24 11:27:29 +00:00
|
|
|
.class public Lcom/discord/stores/StoreReadStates;
|
|
|
|
.super Lcom/discord/stores/Store;
|
|
|
|
.source "StoreReadStates.java"
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final markAsRead:Lrx/subjects/Subject;
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/Subject<",
|
|
|
|
"Ljava/lang/Boolean;",
|
|
|
|
"Ljava/lang/Boolean;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final unreadChannelIds:Lrx/subjects/Subject;
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/Subject<",
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final unreadGuildIds:Lrx/subjects/Subject;
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/Subject<",
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final unreadMessageMarker:Lcom/discord/utilities/persister/Persister;
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lcom/discord/utilities/persister/Persister<",
|
|
|
|
"Lcom/discord/models/application/Unread;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/Store;-><init>()V
|
|
|
|
|
|
|
|
new-instance v0, Lrx/subjects/SerializedSubject;
|
|
|
|
|
|
|
|
new-instance v1, Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-direct {v1}, Ljava/util/HashSet;-><init>()V
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {v1}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreReadStates;->unreadChannelIds:Lrx/subjects/Subject;
|
|
|
|
|
|
|
|
new-instance v0, Lrx/subjects/SerializedSubject;
|
|
|
|
|
|
|
|
new-instance v1, Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-direct {v1}, Ljava/util/HashSet;-><init>()V
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {v1}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreReadStates;->unreadGuildIds:Lrx/subjects/Subject;
|
|
|
|
|
|
|
|
new-instance v0, Lrx/subjects/SerializedSubject;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v1, 0x0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-static {v1}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreReadStates;->markAsRead:Lrx/subjects/Subject;
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/models/application/Unread;
|
|
|
|
|
|
|
|
invoke-direct {v1}, Lcom/discord/models/application/Unread;-><init>()V
|
|
|
|
|
|
|
|
const-string v2, "UNREAD_MESSAGE_MARKER_V3"
|
|
|
|
|
|
|
|
invoke-direct {v0, v2, v1}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreReadStates;->unreadMessageMarker:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public static synthetic a(Lcom/discord/stores/StoreReadStates;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)Landroidx/core/util/Pair;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct/range {p0 .. p5}, Lcom/discord/stores/StoreReadStates;->computeUnreadIds(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)Landroidx/core/util/Pair;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic a(Ljava/lang/Long;Lcom/discord/stores/StoreMessageAck$Ack;Lcom/discord/stores/StoreMessageAck$Ack;Ljava/lang/Long;)Lcom/discord/models/application/Unread$Marker;
|
|
|
|
.locals 12
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Lcom/discord/stores/StoreMessageAck$Ack;->isLockedAck()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/models/application/Unread$Marker;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Lcom/discord/stores/StoreMessageAck$Ack;->getMessageId()J
|
|
|
|
|
|
|
|
move-result-wide v4
|
|
|
|
|
|
|
|
move-object v1, p1
|
|
|
|
|
|
|
|
move-object v6, p3
|
|
|
|
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/discord/models/application/Unread$Marker;-><init>(JJLjava/lang/Long;)V
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
new-instance p2, Lcom/discord/models/application/Unread$Marker;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v7
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreMessageAck$Ack;->getMessageId()J
|
|
|
|
|
|
|
|
move-result-wide v9
|
|
|
|
|
|
|
|
move-object v6, p2
|
|
|
|
|
|
|
|
move-object v11, p3
|
|
|
|
|
|
|
|
invoke-direct/range {v6 .. v11}, Lcom/discord/models/application/Unread$Marker;-><init>(JJLjava/lang/Long;)V
|
|
|
|
|
|
|
|
return-object p2
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p1, Lcom/discord/models/application/Unread$Marker;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
|
|
|
|
move-object v0, p1
|
|
|
|
|
|
|
|
move-object v5, p3
|
|
|
|
|
|
|
|
invoke-direct/range {v0 .. v5}, Lcom/discord/models/application/Unread$Marker;-><init>(JJLjava/lang/Long;)V
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic a(Ljava/lang/Long;Ljava/util/Map;)Lcom/discord/stores/StoreMessageAck$Ack;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-interface {p1, p0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
check-cast p0, Lcom/discord/stores/StoreMessageAck$Ack;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic a(JLcom/discord/models/application/Unread;)Ljava/lang/Boolean;
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/application/Unread;->getMarker()Lcom/discord/models/application/Unread$Marker;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/application/Unread$Marker;->getChannelId()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
cmp-long p2, v0, p0
|
|
|
|
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
|
|
|
|
const/4 p0, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-static {p0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic a(Ljava/lang/Long;)Ljava/lang/Boolean;
|
|
|
|
.locals 4
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
|
|
|
|
cmp-long p0, v0, v2
|
|
|
|
|
|
|
|
if-gtz p0, :cond_0
|
|
|
|
|
|
|
|
const/4 p0, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-static {p0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic a(Lcom/discord/stores/StoreReadStates;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreReadStates;->clearMarker()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic b(Ljava/lang/Long;Ljava/util/Map;)Lcom/discord/stores/StoreMessageAck$Ack;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-interface {p1, p0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
check-cast p0, Lcom/discord/stores/StoreMessageAck$Ack;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic b(Ljava/lang/Long;)Lrx/Observable;
|
|
|
|
.locals 6
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getMessageAck()Lcom/discord/stores/StoreMessageAck;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMessageAck;->get()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Le/a/h/x;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0}, Le/a/h/x;-><init>(Ljava/lang/Long;)V
|
|
|
|
|
2019-12-13 02:35:12 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->f(La0/l/i;)Lrx/Observable;
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->c(I)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getMessageAck()Lcom/discord/stores/StoreMessageAck;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreMessageAck;->get()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
new-instance v3, Le/a/h/h0;
|
|
|
|
|
|
|
|
invoke-direct {v3, p0}, Le/a/h/h0;-><init>(Ljava/lang/Long;)V
|
|
|
|
|
2019-12-13 02:35:12 +00:00
|
|
|
invoke-virtual {v2, v3}, Lrx/Observable;->f(La0/l/i;)Lrx/Observable;
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getMessagesMostRecent()Lcom/discord/stores/StoreMessagesMostRecent;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v4
|
|
|
|
|
|
|
|
invoke-virtual {v3, v4, v5}, Lcom/discord/stores/StoreMessagesMostRecent;->get(J)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-virtual {v3, v1}, Lrx/Observable;->c(I)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
new-instance v3, Le/a/h/c0;
|
|
|
|
|
|
|
|
invoke-direct {v3, p0}, Le/a/h/c0;-><init>(Ljava/lang/Long;)V
|
|
|
|
|
|
|
|
invoke-static {v0, v2, v1, v3}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func3;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
2019-07-24 11:27:29 +00:00
|
|
|
.method private clearMarker()V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreReadStates;->unreadMessageMarker:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/persister/Persister;->getObservable()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
sget-object v1, Le/a/h/b1;->d:Le/a/h/b1;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-13 02:35:12 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->f(La0/l/i;)Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->c(I)Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreReadStates;->unreadMessageMarker:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
new-instance v2, Le/a/h/a;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-direct {v2, v1}, Le/a/h/a;-><init>(Lcom/discord/utilities/persister/Persister;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
const-string v1, "unreadMessageMarker"
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {v2, v1}, Le/a/b/k;->a(Lrx/functions/Action1;Ljava/lang/String;)Lrx/Observable$c;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private computeUnreadChannelIds()V
|
|
|
|
.locals 10
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getPermissions()Lcom/discord/stores/StorePermissions;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StorePermissions;->getForChannels()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getChannels()Lcom/discord/stores/StoreChannels;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreChannels;->get()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getUserGuildSettings()Lcom/discord/stores/StoreUserGuildSettings;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreUserGuildSettings;->get()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getMessageAck()Lcom/discord/stores/StoreMessageAck;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMessageAck;->get()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getMessagesMostRecent()Lcom/discord/stores/StoreMessagesMostRecent;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMessagesMostRecent;->get()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
new-instance v6, Le/a/h/d0;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-direct {v6, p0}, Le/a/h/d0;-><init>(Lcom/discord/stores/StoreReadStates;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
sget-object v9, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
|
|
|
|
const-wide/16 v7, 0x5dc
|
|
|
|
|
|
|
|
invoke-static/range {v1 .. v9}, Lcom/discord/utilities/rx/ObservableWithLeadingEdgeThrottle;->combineLatest(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func5;JLjava/util/concurrent/TimeUnit;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {}, Le/a/b/k;->b()Lrx/Observable$c;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
new-instance v1, Le/a/h/g0;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-direct {v1, p0}, Le/a/h/g0;-><init>(Lcom/discord/stores/StoreReadStates;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
const-string v2, "unreadChannelIds"
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {v1, v2}, Le/a/b/k;->a(Lrx/functions/Action1;Ljava/lang/String;)Lrx/Observable$c;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private computeUnreadIds(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)Landroidx/core/util/Pair;
|
|
|
|
.locals 9
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
2019-11-28 00:30:53 +00:00
|
|
|
"Lcom/discord/models/domain/ModelNotificationSettings;",
|
2019-07-24 11:27:29 +00:00
|
|
|
">;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/stores/StoreMessageAck$Ack;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;)",
|
|
|
|
"Landroidx/core/util/Pair<",
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/HashSet;-><init>()V
|
|
|
|
|
|
|
|
new-instance v1, Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-direct {v1}, Ljava/util/HashSet;-><init>()V
|
|
|
|
|
|
|
|
invoke-interface {p5}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
|
|
|
|
move-result-object p5
|
|
|
|
|
|
|
|
invoke-interface {p5}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p5
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p5}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz v2, :cond_4
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-interface {p5}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Ljava/util/Map$Entry;
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
check-cast v3, Ljava/lang/Long;
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v3
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Ljava/lang/Long;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v5
|
|
|
|
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {p2, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelChannel;->isPrivate()Z
|
|
|
|
|
|
|
|
move-result v7
|
|
|
|
|
|
|
|
if-nez v7, :cond_0
|
|
|
|
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v7
|
|
|
|
|
|
|
|
invoke-interface {p1, v7}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v7
|
|
|
|
|
|
|
|
check-cast v7, Ljava/lang/Integer;
|
|
|
|
|
|
|
|
invoke-static {v2, v7}, Lcom/discord/utilities/permissions/PermissionUtils;->hasAccess(Lcom/discord/models/domain/ModelChannel;Ljava/lang/Integer;)Z
|
|
|
|
|
|
|
|
move-result v7
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-nez v7, :cond_1
|
|
|
|
|
|
|
|
goto :goto_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:cond_1
|
2019-07-24 11:27:29 +00:00
|
|
|
invoke-direct {p0, v2, p3}, Lcom/discord/stores/StoreReadStates;->isChannelMuted(Lcom/discord/models/domain/ModelChannel;Ljava/util/Map;)Z
|
|
|
|
|
|
|
|
move-result v7
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz v7, :cond_2
|
|
|
|
|
|
|
|
goto :goto_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:cond_2
|
2019-07-24 11:27:29 +00:00
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v7
|
|
|
|
|
|
|
|
invoke-interface {p4, v7}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v7
|
|
|
|
|
|
|
|
check-cast v7, Lcom/discord/stores/StoreMessageAck$Ack;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz v7, :cond_3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-virtual {v7}, Lcom/discord/stores/StoreMessageAck$Ack;->getMessageId()J
|
|
|
|
|
|
|
|
move-result-wide v7
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:cond_3
|
2019-07-24 11:27:29 +00:00
|
|
|
const-wide/16 v7, 0x0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
invoke-static {v7, v8}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v7
|
|
|
|
|
|
|
|
invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-static {v7, v5}, Lcom/discord/models/domain/ModelMessage;->isNewer(Ljava/lang/Long;Ljava/lang/Long;)Z
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
if-eqz v5, :cond_0
|
|
|
|
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-interface {v0, v3}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelChannel;->getParentId()J
|
|
|
|
|
|
|
|
move-result-wide v3
|
|
|
|
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-interface {p2, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
check-cast v3, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
|
|
|
|
invoke-direct {p0, v3, p3}, Lcom/discord/stores/StoreReadStates;->isChannelMuted(Lcom/discord/models/domain/ModelChannel;Ljava/util/Map;)Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-nez v3, :cond_0
|
|
|
|
|
2019-08-30 20:04:20 +00:00
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto/16 :goto_0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:cond_4
|
2019-07-24 11:27:29 +00:00
|
|
|
new-instance p1, Landroidx/core/util/Pair;
|
|
|
|
|
|
|
|
invoke-direct {p1, v0, v1}, Landroidx/core/util/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private computeUnreadMarker()V
|
|
|
|
.locals 4
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getChannelsSelected()Lcom/discord/stores/StoreChannelsSelected;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreChannelsSelected;->getId()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
sget-object v1, Le/a/h/b0;->d:Le/a/h/b0;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
new-instance v2, Lcom/discord/models/application/Unread$Marker;
|
|
|
|
|
|
|
|
invoke-direct {v2}, Lcom/discord/models/application/Unread$Marker;-><init>()V
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
sget-object v3, Le/a/h/a0;->d:Le/a/h/a0;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {v1, v2, v3}, Le/a/b/k;->a(Lkotlin/jvm/functions/Function1;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;)Lrx/Observable$c;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
new-instance v1, Le/a/h/f0;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-direct {v1, p0}, Le/a/h/f0;-><init>(Lcom/discord/stores/StoreReadStates;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-13 02:35:12 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->k(La0/l/i;)Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreReadStates;->unreadMessageMarker:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
new-instance v2, Le/a/h/a;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-direct {v2, v1}, Le/a/h/a;-><init>(Lcom/discord/utilities/persister/Persister;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
const-string v1, "unreadMessageMarker"
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {v2, v1}, Le/a/b/k;->a(Lrx/functions/Action1;Ljava/lang/String;)Lrx/Observable$c;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private isChannelMuted(Lcom/discord/models/domain/ModelChannel;Ljava/util/Map;)Z
|
2019-08-30 20:04:20 +00:00
|
|
|
.locals 3
|
2019-12-06 03:29:40 +00:00
|
|
|
.param p1 # Lcom/discord/models/domain/ModelChannel;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p2 # Ljava/util/Map;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
2019-11-28 00:30:53 +00:00
|
|
|
"Lcom/discord/models/domain/ModelNotificationSettings;",
|
2019-07-24 11:27:29 +00:00
|
|
|
">;)Z"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
|
|
|
|
return v0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
2019-08-30 20:04:20 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-interface {p2, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-11-28 00:30:53 +00:00
|
|
|
check-cast p1, Lcom/discord/models/domain/ModelNotificationSettings;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
2019-11-28 00:30:53 +00:00
|
|
|
invoke-virtual {p1, v1, v2}, Lcom/discord/models/domain/ModelNotificationSettings;->getChannelOverride(J)Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
|
2019-11-28 00:30:53 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;->isMuted()Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v0, 0x1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:cond_2
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
# virtual methods
|
|
|
|
.method public synthetic a(Lcom/discord/models/application/Unread$Marker;)Lrx/Observable;
|
|
|
|
.locals 3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getMessages()Lcom/discord/stores/StoreMessages;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/models/application/Unread$Marker;->getChannelId()J
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result-wide v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/discord/stores/StoreMessages;->get(J)Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
new-instance v1, Le/a/h/e0;
|
2019-11-15 02:21:15 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-direct {v1, p1}, Le/a/h/e0;-><init>(Lcom/discord/models/application/Unread$Marker;)V
|
2019-11-15 02:21:15 +00:00
|
|
|
|
2019-12-13 02:35:12 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->f(La0/l/i;)Lrx/Observable;
|
2019-11-15 02:21:15 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result-object p1
|
2019-11-15 02:21:15 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreReadStates;->markAsRead:Lrx/subjects/Subject;
|
2019-11-15 02:21:15 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
sget-object v1, Le/a/h/z;->d:Le/a/h/z;
|
2019-11-15 02:21:15 +00:00
|
|
|
|
2019-12-13 02:35:12 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->c(La0/l/i;)Lrx/Observable;
|
2019-11-15 02:21:15 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result-object v0
|
2019-11-15 02:21:15 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->b(Lrx/Observable;)Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result-object p1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
new-instance v0, Le/a/h/y;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-direct {v0, p0}, Le/a/h/y;-><init>(Lcom/discord/stores/StoreReadStates;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->a(Lrx/functions/Action0;)Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result-object p1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
return-object p1
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public synthetic a(Landroidx/core/util/Pair;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 2
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iget-object v0, p1, Landroidx/core/util/Pair;->first:Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
check-cast v0, Ljava/util/Set;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iget-object p1, p1, Landroidx/core/util/Pair;->second:Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
check-cast p1, Ljava/util/Set;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreReadStates;->unreadChannelIds:Lrx/subjects/Subject;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-13 02:35:12 +00:00
|
|
|
invoke-interface {v1, v0}, La0/g;->onNext(Ljava/lang/Object;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreReadStates;->unreadGuildIds:Lrx/subjects/Subject;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-13 02:35:12 +00:00
|
|
|
invoke-interface {v0, p1}, La0/g;->onNext(Ljava/lang/Object;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
return-void
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getUnreadChannelIds()Lrx/Observable;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreReadStates;->unreadChannelIds:Lrx/subjects/Subject;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getUnreadGuildIds()Lrx/Observable;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreReadStates;->unreadGuildIds:Lrx/subjects/Subject;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getUnreadMarker(J)Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(J)",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/models/application/Unread;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreReadStates;->getUnreadMarkerForSelectedChannel()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
new-instance v1, Le/a/h/i0;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-direct {v1, p1, p2}, Le/a/h/i0;-><init>(J)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-13 02:35:12 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->c(La0/l/i;)Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {p1}, Lrx/Observable;->a()Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getUnreadMarkerForSelectedChannel()Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/models/application/Unread;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreReadStates;->unreadMessageMarker:Lcom/discord/utilities/persister/Persister;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/persister/Persister;->getObservable()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {}, Le/a/b/k;->b()Lrx/Observable$c;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public init(Landroid/content/Context;)V
|
|
|
|
.locals 0
|
2019-12-06 03:29:40 +00:00
|
|
|
.param p1 # Landroid/content/Context;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/stores/Store;->init(Landroid/content/Context;)V
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreReadStates;->computeUnreadChannelIds()V
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreReadStates;->computeUnreadMarker()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public markAsRead(Ljava/lang/Long;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 4
|
2019-12-06 03:29:40 +00:00
|
|
|
.param p1 # Ljava/lang/Long;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-nez p1, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
return-void
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreReadStates;->markAsRead:Lrx/subjects/Subject;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v1, 0x1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2019-12-13 02:35:12 +00:00
|
|
|
invoke-interface {v0, v1}, La0/g;->onNext(Ljava/lang/Object;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreReadStates;->markAsRead:Lrx/subjects/Subject;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v1, 0x0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result-object v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-13 02:35:12 +00:00
|
|
|
invoke-interface {v0, v2}, La0/g;->onNext(Ljava/lang/Object;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getMessageAck()Lcom/discord/stores/StoreMessageAck;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result-wide v2
|
2019-11-15 02:21:15 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {v0, v2, v3, v1, v1}, Lcom/discord/stores/StoreMessageAck;->ack(JZZ)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|