898 lines
28 KiB
Smali
898 lines
28 KiB
Smali
.class public final Lcom/discord/stores/StoreGifPicker;
|
|
.super Lcom/discord/stores/StoreV2;
|
|
.source "StoreGifPicker.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/stores/StoreGifPicker$CacheHistory;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
.field public final gifCategories:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/gifpicker/domain/ModelGifCategory;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public gifCategoriesSnapshot:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/gifpicker/domain/ModelGifCategory;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final gifSearchHistory:Lcom/discord/stores/StoreGifPicker$CacheHistory;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/stores/StoreGifPicker$CacheHistory<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/gifpicker/dto/ModelGif;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final gifSuggestedSearchTermsHistory:Lcom/discord/stores/StoreGifPicker$CacheHistory;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/stores/StoreGifPicker$CacheHistory<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/String;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final gifTrendingSearchTerms:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public gifTrendingSearchTermsSnapshot:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final observationDeck:Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
.field public final restAPI:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
.field public final storeUserSettings:Lcom/discord/stores/StoreUserSettings;
|
|
|
|
.field public trendingGifCategoryPreviewUrl:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/stores/Dispatcher;Lcom/discord/stores/StoreUserSettings;Lcom/discord/utilities/rest/RestAPI;Lcom/discord/stores/updates/ObservationDeck;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreV2;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGifPicker;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreGifPicker;->storeUserSettings:Lcom/discord/stores/StoreUserSettings;
|
|
|
|
iput-object p3, p0, Lcom/discord/stores/StoreGifPicker;->restAPI:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
iput-object p4, p0, Lcom/discord/stores/StoreGifPicker;->observationDeck:Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
sget-object p1, Li0/i/n;->d:Li0/i/n;
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGifPicker;->gifCategoriesSnapshot:Ljava/util/List;
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGifPicker;->gifTrendingSearchTermsSnapshot:Ljava/util/List;
|
|
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGifPicker;->gifCategories:Ljava/util/List;
|
|
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGifPicker;->gifTrendingSearchTerms:Ljava/util/List;
|
|
|
|
const-string p1, ""
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGifPicker;->trendingGifCategoryPreviewUrl:Ljava/lang/String;
|
|
|
|
new-instance p1, Lcom/discord/stores/StoreGifPicker$CacheHistory;
|
|
|
|
invoke-direct {p1}, Lcom/discord/stores/StoreGifPicker$CacheHistory;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGifPicker;->gifSearchHistory:Lcom/discord/stores/StoreGifPicker$CacheHistory;
|
|
|
|
new-instance p1, Lcom/discord/stores/StoreGifPicker$CacheHistory;
|
|
|
|
invoke-direct {p1}, Lcom/discord/stores/StoreGifPicker$CacheHistory;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGifPicker;->gifSuggestedSearchTermsHistory:Lcom/discord/stores/StoreGifPicker$CacheHistory;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "observationDeck"
|
|
|
|
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "restAPI"
|
|
|
|
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "storeUserSettings"
|
|
|
|
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
const-string p1, "dispatcher"
|
|
|
|
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lcom/discord/stores/Dispatcher;Lcom/discord/stores/StoreUserSettings;Lcom/discord/utilities/rest/RestAPI;Lcom/discord/stores/updates/ObservationDeck;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p6, p5, 0x4
|
|
|
|
if-eqz p6, :cond_0
|
|
|
|
sget-object p3, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
invoke-virtual {p3}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object p3
|
|
|
|
:cond_0
|
|
and-int/lit8 p5, p5, 0x8
|
|
|
|
if-eqz p5, :cond_1
|
|
|
|
invoke-static {}, Lcom/discord/stores/updates/ObservationDeckProvider;->get()Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
move-result-object p4
|
|
|
|
:cond_1
|
|
invoke-direct {p0, p1, p2, p3, p4}, Lcom/discord/stores/StoreGifPicker;-><init>(Lcom/discord/stores/Dispatcher;Lcom/discord/stores/StoreUserSettings;Lcom/discord/utilities/rest/RestAPI;Lcom/discord/stores/updates/ObservationDeck;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getDispatcher$p(Lcom/discord/stores/StoreGifPicker;)Lcom/discord/stores/Dispatcher;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreGifPicker;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getGifSearchHistory$p(Lcom/discord/stores/StoreGifPicker;)Lcom/discord/stores/StoreGifPicker$CacheHistory;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreGifPicker;->gifSearchHistory:Lcom/discord/stores/StoreGifPicker$CacheHistory;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getGifSuggestedSearchTermsHistory$p(Lcom/discord/stores/StoreGifPicker;)Lcom/discord/stores/StoreGifPicker$CacheHistory;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreGifPicker;->gifSuggestedSearchTermsHistory:Lcom/discord/stores/StoreGifPicker$CacheHistory;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$handleTrendingCategoriesResponse(Lcom/discord/stores/StoreGifPicker;Lcom/discord/models/gifpicker/dto/TrendingGifCategoriesResponseDto;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreGifPicker;->handleTrendingCategoriesResponse(Lcom/discord/models/gifpicker/dto/TrendingGifCategoriesResponseDto;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$handleTrendingSearchTermsResponse(Lcom/discord/stores/StoreGifPicker;Ljava/util/List;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreGifPicker;->handleTrendingSearchTermsResponse(Ljava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handleTrendingCategoriesResponse(Lcom/discord/models/gifpicker/dto/TrendingGifCategoriesResponseDto;)V
|
|
.locals 5
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/gifpicker/dto/TrendingGifCategoriesResponseDto;->getCategories()Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
const/16 v2, 0xa
|
|
|
|
invoke-static {v0, v2}, Lf/i/a/b/i1/e;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v2
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/models/gifpicker/dto/GifCategoryDto;
|
|
|
|
new-instance v3, Lcom/discord/models/gifpicker/domain/ModelGifCategory;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/gifpicker/dto/GifCategoryDto;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/gifpicker/dto/GifCategoryDto;->getSrc()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {v3, v4, v2}, Lcom/discord/models/gifpicker/domain/ModelGifCategory;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-interface {v1, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->gifCategories:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->clear()V
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->gifCategories:Ljava/util/List;
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/gifpicker/dto/TrendingGifCategoriesResponseDto;->getGifs()Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
xor-int/lit8 v0, v0, 0x1
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-interface {p1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/models/gifpicker/dto/TrendingGifPreviewDto;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/gifpicker/dto/TrendingGifPreviewDto;->getSrc()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const-string p1, ""
|
|
|
|
:goto_1
|
|
iput-object p1, p0, Lcom/discord/stores/StoreGifPicker;->trendingGifCategoryPreviewUrl:Ljava/lang/String;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreV2;->markChanged()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handleTrendingSearchTermsResponse(Ljava/util/List;)V
|
|
.locals 1
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/String;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->gifTrendingSearchTerms:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->clear()V
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->gifTrendingSearchTerms:Ljava/util/List;
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreV2;->markChanged()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final fetchGifCategories()V
|
|
.locals 13
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->restAPI:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGifPicker;->storeUserSettings:Lcom/discord/stores/StoreUserSettings;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreUserSettings;->getLocale()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "storeUserSettings.locale"
|
|
|
|
invoke-static {v1, v2}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v2, "tenor"
|
|
|
|
const-string v3, "tinygif"
|
|
|
|
invoke-virtual {v0, v2, v1, v3}, Lcom/discord/utilities/rest/RestAPI;->getTrendingGifCategories(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v4
|
|
|
|
const-class v5, Lcom/discord/stores/StoreGifPicker;
|
|
|
|
new-instance v10, Lcom/discord/stores/StoreGifPicker$fetchGifCategories$1;
|
|
|
|
invoke-direct {v10, p0}, Lcom/discord/stores/StoreGifPicker$fetchGifCategories$1;-><init>(Lcom/discord/stores/StoreGifPicker;)V
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/16 v11, 0x1e
|
|
|
|
const/4 v12, 0x0
|
|
|
|
invoke-static/range {v4 .. v12}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final fetchGifTrendingSearchTerms()V
|
|
.locals 13
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->restAPI:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGifPicker;->storeUserSettings:Lcom/discord/stores/StoreUserSettings;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreUserSettings;->getLocale()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "storeUserSettings.locale"
|
|
|
|
invoke-static {v1, v2}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v2, "tenor"
|
|
|
|
const/4 v3, 0x5
|
|
|
|
invoke-virtual {v0, v2, v1, v3}, Lcom/discord/utilities/rest/RestAPI;->getGifTrendingSearchTerms(Ljava/lang/String;Ljava/lang/String;I)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v4
|
|
|
|
const-class v5, Lcom/discord/stores/StoreGifPicker;
|
|
|
|
new-instance v10, Lcom/discord/stores/StoreGifPicker$fetchGifTrendingSearchTerms$1;
|
|
|
|
invoke-direct {v10, p0}, Lcom/discord/stores/StoreGifPicker$fetchGifTrendingSearchTerms$1;-><init>(Lcom/discord/stores/StoreGifPicker;)V
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/16 v11, 0x1e
|
|
|
|
const/4 v12, 0x0
|
|
|
|
invoke-static/range {v4 .. v12}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final getGifCategories()Ljava/util/List;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/gifpicker/domain/ModelGifCategory;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->gifCategoriesSnapshot:Ljava/util/List;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getGifTrendingSearchTerms()Ljava/util/List;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->gifTrendingSearchTermsSnapshot:Ljava/util/List;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getTrendingGifCategoryPreviewUrl()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->trendingGifCategoryPreviewUrl:Ljava/lang/String;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final observeGifCategories()Lrx/Observable;
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/gifpicker/domain/ModelGifCategory;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->observationDeck:Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [Lcom/discord/stores/updates/ObservationDeck$UpdateSource;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object p0, v1, v2
|
|
|
|
new-instance v4, Lcom/discord/stores/StoreGifPicker$observeGifCategories$1;
|
|
|
|
invoke-direct {v4, p0}, Lcom/discord/stores/StoreGifPicker$observeGifCategories$1;-><init>(Lcom/discord/stores/StoreGifPicker;)V
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v5, 0x4
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/stores/updates/ObservationDeck;->connectRx$default(Lcom/discord/stores/updates/ObservationDeck;[Lcom/discord/stores/updates/ObservationDeck$UpdateSource;ZLrx/Emitter$BackpressureMode;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final observeGifTrendingSearchTerms()Lrx/Observable;
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/String;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->observationDeck:Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [Lcom/discord/stores/updates/ObservationDeck$UpdateSource;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object p0, v1, v2
|
|
|
|
new-instance v4, Lcom/discord/stores/StoreGifPicker$observeGifTrendingSearchTerms$1;
|
|
|
|
invoke-direct {v4, p0}, Lcom/discord/stores/StoreGifPicker$observeGifTrendingSearchTerms$1;-><init>(Lcom/discord/stores/StoreGifPicker;)V
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v5, 0x4
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/stores/updates/ObservationDeck;->connectRx$default(Lcom/discord/stores/updates/ObservationDeck;[Lcom/discord/stores/updates/ObservationDeck$UpdateSource;ZLrx/Emitter$BackpressureMode;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final observeGifsForSearchQuery(Ljava/lang/String;)Lrx/Observable;
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
")",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/gifpicker/dto/ModelGif;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->gifSearchHistory:Lcom/discord/stores/StoreGifPicker$CacheHistory;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/LinkedHashMap;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->gifSearchHistory:Lcom/discord/stores/StoreGifPicker$CacheHistory;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/LinkedHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v0, Lq0/l/e/j;
|
|
|
|
invoke-direct {v0, p1}, Lq0/l/e/j;-><init>(Ljava/lang/Object;)V
|
|
|
|
const-string p1, "Observable.just(gifSearchHistory[query])"
|
|
|
|
invoke-static {v0, p1}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGifPicker;->restAPI:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->storeUserSettings:Lcom/discord/stores/StoreUserSettings;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreUserSettings;->getLocale()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v0, "storeUserSettings.locale"
|
|
|
|
invoke-static {v4, v0}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/16 v6, 0x32
|
|
|
|
const-string v3, "tenor"
|
|
|
|
const-string v5, "tinygif"
|
|
|
|
move-object v2, p1
|
|
|
|
invoke-virtual/range {v1 .. v6}, Lcom/discord/utilities/rest/RestAPI;->getGifSearchResults(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreGifPicker$observeGifsForSearchQuery$1;->INSTANCE:Lcom/discord/stores/StoreGifPicker$observeGifsForSearchQuery$1;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->C(Lq0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreGifPicker$observeGifsForSearchQuery$2;
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/stores/StoreGifPicker$observeGifsForSearchQuery$2;-><init>(Lcom/discord/stores/StoreGifPicker;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->r(Lrx/functions/Action1;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "restAPI.getGifSearchResu\u2026y[query] = gifs\n }"
|
|
|
|
invoke-static {p1, v0}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_1
|
|
const-string p1, "query"
|
|
|
|
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final observeSuggestedSearchTerms(Ljava/lang/String;)Lrx/Observable;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
")",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/String;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->gifSuggestedSearchTermsHistory:Lcom/discord/stores/StoreGifPicker$CacheHistory;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/LinkedHashMap;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->gifSuggestedSearchTermsHistory:Lcom/discord/stores/StoreGifPicker$CacheHistory;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/LinkedHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v0, Lq0/l/e/j;
|
|
|
|
invoke-direct {v0, p1}, Lq0/l/e/j;-><init>(Ljava/lang/Object;)V
|
|
|
|
const-string p1, "Observable.just(gifSugge\u2026earchTermsHistory[query])"
|
|
|
|
invoke-static {v0, p1}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->restAPI:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGifPicker;->storeUserSettings:Lcom/discord/stores/StoreUserSettings;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreUserSettings;->getLocale()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "storeUserSettings.locale"
|
|
|
|
invoke-static {v1, v2}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v2, 0x5
|
|
|
|
const-string v3, "tenor"
|
|
|
|
invoke-virtual {v0, v3, p1, v1, v2}, Lcom/discord/utilities/rest/RestAPI;->getGifSuggestedSearchTerms(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreGifPicker$observeSuggestedSearchTerms$1;
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/stores/StoreGifPicker$observeSuggestedSearchTerms$1;-><init>(Lcom/discord/stores/StoreGifPicker;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->r(Lrx/functions/Action1;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "restAPI.getGifSuggestedS\u2026uggestedSearchTerms\n }"
|
|
|
|
invoke-static {p1, v0}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_1
|
|
const-string p1, "query"
|
|
|
|
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final observeTrendingCategoryGifs()Lrx/Observable;
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/models/gifpicker/dto/ModelGif;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->restAPI:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGifPicker;->storeUserSettings:Lcom/discord/stores/StoreUserSettings;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreUserSettings;->getLocale()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "storeUserSettings.locale"
|
|
|
|
invoke-static {v1, v2}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v2, "tenor"
|
|
|
|
const-string v3, "tinygif"
|
|
|
|
const/16 v4, 0x32
|
|
|
|
invoke-virtual {v0, v2, v1, v3, v4}, Lcom/discord/utilities/rest/RestAPI;->getTrendingGifCategory(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreGifPicker$observeTrendingCategoryGifs$1;->INSTANCE:Lcom/discord/stores/StoreGifPicker$observeTrendingCategoryGifs$1;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->C(Lq0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "restAPI.getTrendingGifCa\u2026to)\n }\n }"
|
|
|
|
invoke-static {v0, v1}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final observeTrendingGifCategoryPreviewUrl()Lrx/Observable;
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreGifPicker;->observationDeck:Lcom/discord/stores/updates/ObservationDeck;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [Lcom/discord/stores/updates/ObservationDeck$UpdateSource;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object p0, v1, v2
|
|
|
|
new-instance v4, Lcom/discord/stores/StoreGifPicker$observeTrendingGifCategoryPreviewUrl$1;
|
|
|
|
invoke-direct {v4, p0}, Lcom/discord/stores/StoreGifPicker$observeTrendingGifCategoryPreviewUrl$1;-><init>(Lcom/discord/stores/StoreGifPicker;)V
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v5, 0x4
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/stores/updates/ObservationDeck;->connectRx$default(Lcom/discord/stores/updates/ObservationDeck;[Lcom/discord/stores/updates/ObservationDeck$UpdateSource;ZLrx/Emitter$BackpressureMode;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public snapshotData()V
|
|
.locals 2
|
|
|
|
invoke-super {p0}, Lcom/discord/stores/StoreV2;->snapshotData()V
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGifPicker;->gifCategories:Ljava/util/List;
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGifPicker;->gifCategoriesSnapshot:Ljava/util/List;
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreGifPicker;->gifTrendingSearchTerms:Ljava/util/List;
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreGifPicker;->gifTrendingSearchTermsSnapshot:Ljava/util/List;
|
|
|
|
return-void
|
|
.end method
|