.class public final Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$LoggingLinearLayoutManager; .super Landroidx/recyclerview/widget/LinearLayoutManager; .source "MGRecyclerAdapter.kt" # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x19 name = "LoggingLinearLayoutManager" .end annotation # instance fields .field public final adapterRecyclerWeakReference:Ljava/lang/ref/WeakReference; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/lang/ref/WeakReference<", "Landroidx/recyclerview/widget/RecyclerView;", ">;" } .end annotation .end field .field public final adapterWeakReference:Ljava/lang/ref/WeakReference; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/lang/ref/WeakReference<", "Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter<", "*>;>;" } .end annotation .end field .field public final handler:Landroid/os/Handler; # direct methods .method public constructor (Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;I)V .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter<", "*>;I)V" } .end annotation if-eqz p1, :cond_0 invoke-virtual {p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->getContext()Landroid/content/Context; move-result-object v0 const/4 v1, 0x0 invoke-direct {p0, v0, p2, v1}, Landroidx/recyclerview/widget/LinearLayoutManager;->(Landroid/content/Context;IZ)V new-instance p2, Landroid/os/Handler; invoke-direct {p2}, Landroid/os/Handler;->()V iput-object p2, p0, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$LoggingLinearLayoutManager;->handler:Landroid/os/Handler; new-instance p2, Ljava/lang/ref/WeakReference; invoke-direct {p2, p1}, Ljava/lang/ref/WeakReference;->(Ljava/lang/Object;)V iput-object p2, p0, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$LoggingLinearLayoutManager;->adapterWeakReference:Ljava/lang/ref/WeakReference; new-instance p2, Ljava/lang/ref/WeakReference; invoke-virtual {p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->getRecycler()Landroidx/recyclerview/widget/RecyclerView; move-result-object p1 invoke-direct {p2, p1}, Ljava/lang/ref/WeakReference;->(Ljava/lang/Object;)V iput-object p2, p0, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$LoggingLinearLayoutManager;->adapterRecyclerWeakReference:Ljava/lang/ref/WeakReference; const/4 p1, 0x1 invoke-virtual {p0, p1}, Landroidx/recyclerview/widget/LinearLayoutManager;->setSmoothScrollbarEnabled(Z)V return-void :cond_0 const-string p1, "adapter" invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V const/4 p1, 0x0 throw p1 .end method .method private final resetAdapter(Ljava/lang/Throwable;)V .locals 8 iget-object v0, p0, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$LoggingLinearLayoutManager;->adapterRecyclerWeakReference:Ljava/lang/ref/WeakReference; invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/recyclerview/widget/RecyclerView; iget-object v1, p0, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$LoggingLinearLayoutManager;->adapterWeakReference:Ljava/lang/ref/WeakReference; invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object; move-result-object v1 check-cast v1, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter; if-eqz v1, :cond_0 new-instance v4, Ljava/lang/Exception; const-string v2, "Triggered in adapter: " invoke-static {v2}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class; move-result-object v3 invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v2 invoke-direct {v4, v2, p1}, Ljava/lang/Exception;->(Ljava/lang/String;Ljava/lang/Throwable;)V sget-object v2, Lcom/discord/app/AppLog;->d:Lcom/discord/app/AppLog; const/4 v5, 0x0 const/4 v6, 0x4 const/4 v7, 0x0 const-string v3, "Invalid adapter configuration." invoke-static/range {v2 .. v7}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V :cond_0 iget-object p1, p0, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$LoggingLinearLayoutManager;->handler:Landroid/os/Handler; new-instance v2, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$LoggingLinearLayoutManager$resetAdapter$1; invoke-direct {v2, v1, v0}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$LoggingLinearLayoutManager$resetAdapter$1;->(Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;Landroidx/recyclerview/widget/RecyclerView;)V invoke-virtual {p1, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z return-void .end method # virtual methods .method public onLayoutChildren(Landroidx/recyclerview/widget/RecyclerView$Recycler;Landroidx/recyclerview/widget/RecyclerView$State;)V .locals 4 if-eqz p2, :cond_3 :try_start_0 invoke-super {p0, p1, p2}, Landroidx/recyclerview/widget/LinearLayoutManager;->onLayoutChildren(Landroidx/recyclerview/widget/RecyclerView$Recycler;Landroidx/recyclerview/widget/RecyclerView$State;)V :try_end_0 .catch Ljava/lang/IndexOutOfBoundsException; {:try_start_0 .. :try_end_0} :catch_2 .catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_1 .catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_0 :catch_0 move-exception p1 invoke-virtual {p1}, Ljava/lang/RuntimeException;->getMessage()Ljava/lang/String; move-result-object p2 const/4 v0, 0x1 const/4 v1, 0x2 const/4 v2, 0x0 if-eqz p2, :cond_0 const-string v3, "trying to unhide" invoke-static {p2, v3, v2, v1}, Lj0/t/p;->contains$default(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZI)Z move-result p2 if-eq p2, v0, :cond_1 :cond_0 invoke-virtual {p1}, Ljava/lang/RuntimeException;->getMessage()Ljava/lang/String; move-result-object p2 if-eqz p2, :cond_2 const-string v3, "tying to hide" invoke-static {p2, v3, v2, v1}, Lj0/t/p;->contains$default(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZI)Z move-result p2 if-ne p2, v0, :cond_2 :cond_1 invoke-direct {p0, p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$LoggingLinearLayoutManager;->resetAdapter(Ljava/lang/Throwable;)V goto :goto_0 :cond_2 throw p1 :catch_1 move-exception p1 invoke-direct {p0, p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$LoggingLinearLayoutManager;->resetAdapter(Ljava/lang/Throwable;)V goto :goto_0 :catch_2 move-exception p1 invoke-direct {p0, p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$LoggingLinearLayoutManager;->resetAdapter(Ljava/lang/Throwable;)V :goto_0 return-void :cond_3 const-string p1, "state" invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V const/4 p1, 0x0 throw p1 .end method