142 lines
3.2 KiB
Smali
142 lines
3.2 KiB
Smali
.class public final Lcom/vk/api/comments/CommentsOrder$b;
|
|
.super Ljava/lang/Object;
|
|
.source "CommentsOrder.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/vk/api/comments/CommentsOrder;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "b"
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
.line 2
|
|
invoke-direct {p0}, Lcom/vk/api/comments/CommentsOrder$b;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Lorg/json/JSONObject;)Lcom/vk/api/comments/CommentsOrder;
|
|
.locals 8
|
|
|
|
const-string v0, "current_order"
|
|
|
|
.line 1
|
|
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "items"
|
|
|
|
.line 2
|
|
invoke-virtual {p1, v1}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 3
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
invoke-virtual {p1}, Lorg/json/JSONArray;->length()I
|
|
|
|
move-result v2
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 4
|
|
invoke-virtual {p1}, Lorg/json/JSONArray;->length()I
|
|
|
|
move-result v3
|
|
|
|
:goto_0
|
|
if-ge v2, v3, :cond_2
|
|
|
|
invoke-virtual {p1, v2}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;
|
|
|
|
move-result-object v4
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
.line 5
|
|
new-instance v5, Lcom/vk/api/comments/CommentsOrder$Item;
|
|
|
|
const-string v6, "id"
|
|
|
|
invoke-virtual {v4, v6}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
const-string v7, "it.optString(\"id\")"
|
|
|
|
invoke-static {v6, v7}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v7, "name"
|
|
|
|
invoke-virtual {v4, v7}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v7, "it.optString(\"name\")"
|
|
|
|
invoke-static {v4, v7}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {v5, v6, v4}, Lcom/vk/api/comments/CommentsOrder$Item;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
:cond_0
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v1, 0x0
|
|
|
|
:cond_2
|
|
if-eqz v1, :cond_3
|
|
|
|
goto :goto_1
|
|
|
|
.line 6
|
|
:cond_3
|
|
invoke-static {}, Lkotlin/collections/l;->a()Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
.line 7
|
|
:goto_1
|
|
new-instance p1, Lcom/vk/api/comments/CommentsOrder;
|
|
|
|
const-string v2, "currentOrder"
|
|
|
|
invoke-static {v0, v2}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p1, v0, v1}, Lcom/vk/api/comments/CommentsOrder;-><init>(Ljava/lang/String;Ljava/util/List;)V
|
|
|
|
return-object p1
|
|
.end method
|