315 lines
13 KiB
Smali
315 lines
13 KiB
Smali
.class public Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;
|
|
.super Lcom/discord/app/AppFragment;
|
|
|
|
|
|
# static fields
|
|
.field private static final INTENT_EXTRA_CHANNEL_ID:Ljava/lang/String; = "INTENT_EXTRA_CHANNEL_ID"
|
|
|
|
.field private static final INTENT_EXTRA_MESSAGE_ID:Ljava/lang/String; = "INTENT_EXTRA_MESSAGE_ID"
|
|
|
|
|
|
# instance fields
|
|
.field private dataSubscription:Lrx/Subscription;
|
|
|
|
.field private emojisAdapter:Lcom/discord/widgets/chat/manage_reactions/ManageReactionsEmojisAdapter;
|
|
|
|
.field emojisRecycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
.annotation runtime Lbutterknife/BindView;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private modelProvider:Lcom/discord/widgets/chat/manage_reactions/ManageReactionsModelProvider;
|
|
|
|
.field private resultsAdapter:Lcom/discord/widgets/chat/manage_reactions/ManageReactionsResultsAdapter;
|
|
|
|
.field usersRecycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
.annotation runtime Lbutterknife/BindView;
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppFragment;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private configureUI(Lcom/discord/widgets/chat/manage_reactions/ManageReactionsModel;)V
|
|
.locals 2
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->getActivity()Landroidx/fragment/app/FragmentActivity;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Landroid/app/Activity;->finish()V
|
|
|
|
:cond_0
|
|
return-void
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->emojisAdapter:Lcom/discord/widgets/chat/manage_reactions/ManageReactionsEmojisAdapter;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/manage_reactions/ManageReactionsModel;->getReactionItems()Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/widgets/chat/manage_reactions/ManageReactionsEmojisAdapter;->setData(Ljava/util/List;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->resultsAdapter:Lcom/discord/widgets/chat/manage_reactions/ManageReactionsResultsAdapter;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/manage_reactions/ManageReactionsModel;->getUserItems()Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/widgets/chat/manage_reactions/ManageReactionsResultsAdapter;->setData(Ljava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static create(JJLandroid/content/Context;)V
|
|
.locals 2
|
|
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
|
|
|
|
const-string v1, "INTENT_EXTRA_CHANNEL_ID"
|
|
|
|
invoke-virtual {v0, v1, p0, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
const-string p1, "INTENT_EXTRA_MESSAGE_ID"
|
|
|
|
invoke-virtual {p0, p1, p2, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
const-class p1, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;
|
|
|
|
invoke-static {p4, p1, p0}, Lcom/discord/app/e;->a(Landroid/content/Context;Ljava/lang/Class;Landroid/content/Intent;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic lambda$EOtgDZnjFlh2YlDanDz84S_Vjak(Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;Lcom/discord/widgets/chat/manage_reactions/ManageReactionsModel;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->configureUI(Lcom/discord/widgets/chat/manage_reactions/ManageReactionsModel;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic lambda$onViewBound$0(Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;)Lkotlin/Unit;
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->requestData()V
|
|
|
|
sget-object v0, Lkotlin/Unit;->bPm:Lkotlin/Unit;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static synthetic lambda$onViewBound$1(Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;Lcom/discord/models/domain/ModelMessageReaction$Emoji;)Lkotlin/Unit;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->modelProvider:Lcom/discord/widgets/chat/manage_reactions/ManageReactionsModelProvider;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/widgets/chat/manage_reactions/ManageReactionsModelProvider;->onEmojiTargeted(Lcom/discord/models/domain/ModelMessageReaction$Emoji;)V
|
|
|
|
sget-object p1, Lkotlin/Unit;->bPm:Lkotlin/Unit;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static synthetic lambda$requestData$2(Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;Lrx/Subscription;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->dataSubscription:Lrx/Subscription;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private requestData()V
|
|
.locals 5
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->dataSubscription:Lrx/Subscription;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->dataSubscription:Lrx/Subscription;
|
|
|
|
invoke-interface {v0}, Lrx/Subscription;->unsubscribe()V
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->modelProvider:Lcom/discord/widgets/chat/manage_reactions/ManageReactionsModelProvider;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/chat/manage_reactions/ManageReactionsModelProvider;->get()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0}, Lcom/discord/app/g;->b(Lcom/discord/app/AppComponent;)Lrx/Observable$Transformer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/widgets/chat/manage_reactions/-$$Lambda$WidgetManageReactions$EOtgDZnjFlh2YlDanDz84S_Vjak;
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/widgets/chat/manage_reactions/-$$Lambda$WidgetManageReactions$EOtgDZnjFlh2YlDanDz84S_Vjak;-><init>(Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;)V
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
new-instance v4, Lcom/discord/widgets/chat/manage_reactions/-$$Lambda$WidgetManageReactions$sHuYwGTyQI6Vyjqy0-Ygtg64Ghk;
|
|
|
|
invoke-direct {v4, p0}, Lcom/discord/widgets/chat/manage_reactions/-$$Lambda$WidgetManageReactions$sHuYwGTyQI6Vyjqy0-Ygtg64Ghk;-><init>(Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;)V
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lcom/discord/app/g;->a(Lrx/functions/Action1;Ljava/lang/Class;Lrx/functions/Action1;Lrx/functions/Action1;)Lrx/Observable$Transformer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getContentViewResId()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d011a
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onActivityCreated(Landroid/os/Bundle;)V
|
|
.locals 0
|
|
.param p1 # Landroid/os/Bundle;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/app/AppFragment;->onActivityCreated(Landroid/os/Bundle;)V
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->setActionBarDisplayHomeAsUpEnabled()Landroidx/appcompat/widget/Toolbar;
|
|
|
|
const p1, 0x7f120bec
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->setActionBarTitle(I)Lkotlin/Unit;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onViewBound(Landroid/view/View;)V
|
|
.locals 1
|
|
.param p1 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/app/AppFragment;->onViewBound(Landroid/view/View;)V
|
|
|
|
new-instance p1, Lcom/discord/widgets/chat/manage_reactions/ManageReactionsEmojisAdapter;
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->emojisRecycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
invoke-direct {p1, v0}, Lcom/discord/widgets/chat/manage_reactions/ManageReactionsEmojisAdapter;-><init>(Landroidx/recyclerview/widget/RecyclerView;)V
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->configure(Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;)Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/widgets/chat/manage_reactions/ManageReactionsEmojisAdapter;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->emojisAdapter:Lcom/discord/widgets/chat/manage_reactions/ManageReactionsEmojisAdapter;
|
|
|
|
new-instance p1, Lcom/discord/widgets/chat/manage_reactions/ManageReactionsResultsAdapter;
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->usersRecycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
invoke-direct {p1, v0}, Lcom/discord/widgets/chat/manage_reactions/ManageReactionsResultsAdapter;-><init>(Landroidx/recyclerview/widget/RecyclerView;)V
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->configure(Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;)Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/widgets/chat/manage_reactions/ManageReactionsResultsAdapter;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->resultsAdapter:Lcom/discord/widgets/chat/manage_reactions/ManageReactionsResultsAdapter;
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->resultsAdapter:Lcom/discord/widgets/chat/manage_reactions/ManageReactionsResultsAdapter;
|
|
|
|
new-instance v0, Lcom/discord/widgets/chat/manage_reactions/-$$Lambda$WidgetManageReactions$UD1HVn1cIddn0KzPUmGr7e11wM0;
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/widgets/chat/manage_reactions/-$$Lambda$WidgetManageReactions$UD1HVn1cIddn0KzPUmGr7e11wM0;-><init>(Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;)V
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/widgets/chat/manage_reactions/ManageReactionsResultsAdapter;->setOnRetryListener(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->emojisAdapter:Lcom/discord/widgets/chat/manage_reactions/ManageReactionsEmojisAdapter;
|
|
|
|
new-instance v0, Lcom/discord/widgets/chat/manage_reactions/-$$Lambda$WidgetManageReactions$MthlVtVycS3p2KLAmR-76HkbmuU;
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/widgets/chat/manage_reactions/-$$Lambda$WidgetManageReactions$MthlVtVycS3p2KLAmR-76HkbmuU;-><init>(Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;)V
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/widgets/chat/manage_reactions/ManageReactionsEmojisAdapter;->setOnEmojiSelectedListener(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onViewBoundOrOnResume()V
|
|
.locals 6
|
|
|
|
invoke-super {p0}, Lcom/discord/app/AppFragment;->onViewBoundOrOnResume()V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->modelProvider:Lcom/discord/widgets/chat/manage_reactions/ManageReactionsModelProvider;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "INTENT_EXTRA_CHANNEL_ID"
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
invoke-virtual {v0, v1, v2, v3}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v5, "INTENT_EXTRA_MESSAGE_ID"
|
|
|
|
invoke-virtual {v4, v5, v2, v3}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v2
|
|
|
|
new-instance v4, Lcom/discord/widgets/chat/manage_reactions/ManageReactionsModelProvider;
|
|
|
|
invoke-direct {v4, v0, v1, v2, v3}, Lcom/discord/widgets/chat/manage_reactions/ManageReactionsModelProvider;-><init>(JJ)V
|
|
|
|
iput-object v4, p0, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->modelProvider:Lcom/discord/widgets/chat/manage_reactions/ManageReactionsModelProvider;
|
|
|
|
:cond_0
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/manage_reactions/WidgetManageReactions;->requestData()V
|
|
|
|
return-void
|
|
.end method
|