SubChapterAdapter$1.smali

.class Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;
.super Ljava/lang/Object;
.source "SubChapterAdapter.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;->onBindViewHolder(Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$SubChapterAdapterVH;I)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;

.field final synthetic val$position:I

.field final synthetic val$quizId:Ljava/lang/String;


# direct methods
.method constructor <init>(Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;ILjava/lang/String;)V
    .registers 4
    .annotation system Ldalvik/annotation/MethodParameters;
        accessFlags = {
            0x8010,
            0x1010,
            0x1010
        }
        names = {
            "this$0",
            "val$position",
            "val$quizId"
        }
    .end annotation

    .line 88
    iput-object p1, p0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;->this$0:Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;

    iput p2, p0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;->val$position:I

    iput-object p3, p0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;->val$quizId:Ljava/lang/String;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .registers 5
    .annotation system Ldalvik/annotation/MethodParameters;
        accessFlags = {
            0x0
        }
        names = {
            "v"
        }
    .end annotation

    .line 92
    iget-object p1, p0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;->this$0:Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;

    iget-object p1, p1, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;->dbQuiz:Lcom/yctpublication/mastes/common/storevalue/databasebook/DatabaseHandlerofQuiz;

    iget-object v0, p0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;->this$0:Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;

    iget-object v0, v0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;->subChapterModelList:Ljava/util/List;

    iget v1, p0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;->val$position:I

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/yctpublication/mastes/models/SubChapterModel;

    invoke-virtual {v0}, Lcom/yctpublication/mastes/models/SubChapterModel;->getId()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1, v0}, Lcom/yctpublication/mastes/common/storevalue/databasebook/DatabaseHandlerofQuiz;->getLastPageSaveSubChapter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    if-eqz p1, :cond_35

    .line 93
    iget-object p1, p0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;->this$0:Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;

    iget-object v0, p1, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;->dbQuiz:Lcom/yctpublication/mastes/common/storevalue/databasebook/DatabaseHandlerofQuiz;

    iget-object v1, p0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;->this$0:Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;

    iget-object v1, v1, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;->subChapterModelList:Ljava/util/List;

    iget v2, p0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;->val$position:I

    invoke-interface {v1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/yctpublication/mastes/models/SubChapterModel;

    invoke-virtual {v1}, Lcom/yctpublication/mastes/models/SubChapterModel;->getId()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/yctpublication/mastes/common/storevalue/databasebook/DatabaseHandlerofQuiz;->getLastPageSaveSubChapter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p1, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;->saveQuiz:Ljava/lang/String;

    goto :goto_3b

    .line 96
    :cond_35
    iget-object p1, p0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;->this$0:Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;

    const-string v0, "0"

    iput-object v0, p1, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;->saveQuiz:Ljava/lang/String;

    .line 98
    :goto_3b
    new-instance p1, Landroid/content/Intent;

    iget-object v0, p0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;->this$0:Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;

    iget-object v0, v0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;->context:Landroid/content/Context;

    const-class v1, Lcom/yctpublication/mastes/quiz/QuestionsActivity;

    invoke-direct {p1, v0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 99
    iget-object v0, p0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;->this$0:Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;

    iget-object v0, v0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;->chapter_id:Ljava/lang/String;

    const-string v1, "chid"

    invoke-virtual {p1, v1, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 100
    iget-object v0, p0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;->this$0:Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;

    iget-object v0, v0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;->subChapterModelList:Ljava/util/List;

    iget v1, p0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;->val$position:I

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/yctpublication/mastes/models/SubChapterModel;

    invoke-virtual {v0}, Lcom/yctpublication/mastes/models/SubChapterModel;->getId()Ljava/lang/String;

    move-result-object v0

    const-string v1, "subid"

    invoke-virtual {p1, v1, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 101
    iget-object v0, p0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;->this$0:Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;

    iget-object v0, v0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;->saveQuiz:Ljava/lang/String;

    const-string v1, "saveQuiz"

    invoke-virtual {p1, v1, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 102
    iget-object v0, p0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;->val$quizId:Ljava/lang/String;

    const-string v1, "quizId"

    invoke-virtual {p1, v1, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 103
    iget-object v0, p0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter$1;->this$0:Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;

    iget-object v0, v0, Lcom/yctpublication/mastes/quiz/adapters/SubChapterAdapter;->context:Landroid/content/Context;

    invoke-virtual {v0, p1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    return-void
.end method