572 lines
14 KiB
Smali
572 lines
14 KiB
Smali
.class public final Lcom/discord/widgets/notice/NoticePopup;
|
|
.super Ljava/lang/Object;
|
|
.source "NoticePopup.kt"
|
|
|
|
|
|
# static fields
|
|
.field private static final DEFAULT_AUTO_DISMISS_PERIOD_SECONDS:I = 0x5
|
|
|
|
.field public static final INSTANCE:Lcom/discord/widgets/notice/NoticePopup;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
new-instance v0, Lcom/discord/widgets/notice/NoticePopup;
|
|
|
|
invoke-direct {v0}, Lcom/discord/widgets/notice/NoticePopup;-><init>()V
|
|
|
|
sput-object v0, Lcom/discord/widgets/notice/NoticePopup;->INSTANCE:Lcom/discord/widgets/notice/NoticePopup;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$cancelCountdown(Lcom/discord/widgets/notice/NoticePopup;Landroid/animation/ValueAnimator;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/notice/NoticePopup;->cancelCountdown(Landroid/animation/ValueAnimator;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$dismiss(Lcom/discord/widgets/notice/NoticePopup;Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/notice/NoticePopup;->dismiss(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getAutoDismissAnimator(Lcom/discord/widgets/notice/NoticePopup;Ljava/lang/Integer;Lkotlin/jvm/functions/Function0;)Landroid/animation/ValueAnimator;
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/notice/NoticePopup;->getAutoDismissAnimator(Ljava/lang/Integer;Lkotlin/jvm/functions/Function0;)Landroid/animation/ValueAnimator;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final cancelCountdown(Landroid/animation/ValueAnimator;)V
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Landroid/animation/ValueAnimator;->cancel()V
|
|
|
|
:cond_0
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-virtual {p1}, Landroid/animation/ValueAnimator;->end()V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private final dismiss(Ljava/lang/String;)V
|
|
.locals 7
|
|
|
|
sget-object v0, Lf/m/a/h;->b:Ljava/lang/ref/WeakReference;
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/app/Activity;
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Landroid/view/Window;->getDecorView()Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v0, v1
|
|
|
|
:goto_0
|
|
instance-of v2, v0, Landroid/view/ViewGroup;
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
move-object v0, v1
|
|
|
|
:cond_1
|
|
check-cast v0, Landroid/view/ViewGroup;
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {v0}, Landroid/view/ViewGroup;->getChildCount()I
|
|
|
|
move-result v3
|
|
|
|
if-ltz v3, :cond_5
|
|
|
|
:goto_1
|
|
invoke-virtual {v0, v2}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v4
|
|
|
|
instance-of v4, v4, Lf/m/a/b;
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
invoke-virtual {v0, v2}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v4
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
check-cast v4, Lf/m/a/b;
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
new-instance p1, Lkotlin/TypeCastException;
|
|
|
|
const-string v0, "null cannot be cast to non-null type com.tapadoo.alerter.Alert"
|
|
|
|
invoke-direct {p1, v0}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_3
|
|
move-object v4, v1
|
|
|
|
:goto_2
|
|
if-eqz v4, :cond_4
|
|
|
|
invoke-virtual {v4}, Landroid/widget/FrameLayout;->getWindowToken()Landroid/os/IBinder;
|
|
|
|
move-result-object v5
|
|
|
|
if-eqz v5, :cond_4
|
|
|
|
invoke-static {v4}, Landroidx/core/view/ViewCompat;->animate(Landroid/view/View;)Landroidx/core/view/ViewPropertyAnimatorCompat;
|
|
|
|
move-result-object v5
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-virtual {v5, v6}, Landroidx/core/view/ViewPropertyAnimatorCompat;->alpha(F)Landroidx/core/view/ViewPropertyAnimatorCompat;
|
|
|
|
move-result-object v5
|
|
|
|
new-instance v6, Lf/m/a/f;
|
|
|
|
invoke-direct {v6, v4}, Lf/m/a/f;-><init>(Lf/m/a/b;)V
|
|
|
|
invoke-virtual {v5, v6}, Landroidx/core/view/ViewPropertyAnimatorCompat;->withEndAction(Ljava/lang/Runnable;)Landroidx/core/view/ViewPropertyAnimatorCompat;
|
|
|
|
:cond_4
|
|
if-eq v2, v3, :cond_5
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_5
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getNotices()Lcom/discord/stores/StoreNotices;
|
|
|
|
move-result-object v1
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
const/4 v5, 0x2
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v2, p1
|
|
|
|
invoke-static/range {v1 .. v6}, Lcom/discord/stores/StoreNotices;->markSeen$default(Lcom/discord/stores/StoreNotices;Ljava/lang/String;JILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic enqueue$default(Lcom/discord/widgets/notice/NoticePopup;Ljava/lang/String;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/graphics/drawable/Drawable;Ljava/lang/String;Landroid/graphics/drawable/Drawable;Ljava/lang/String;Ljava/lang/Integer;Landroid/graphics/drawable/Drawable;Ljava/lang/Integer;Ljava/util/List;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
.locals 18
|
|
|
|
move/from16 v0, p15
|
|
|
|
and-int/lit8 v1, v0, 0x4
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
move-object v6, v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object/from16 v6, p3
|
|
|
|
:goto_0
|
|
and-int/lit8 v1, v0, 0x10
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
move-object v8, v2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
move-object/from16 v8, p5
|
|
|
|
:goto_1
|
|
and-int/lit8 v1, v0, 0x20
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
move-object v9, v2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
move-object/from16 v9, p6
|
|
|
|
:goto_2
|
|
and-int/lit8 v1, v0, 0x40
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
move-object v10, v2
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
move-object/from16 v10, p7
|
|
|
|
:goto_3
|
|
and-int/lit16 v1, v0, 0x80
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
move-object v11, v2
|
|
|
|
goto :goto_4
|
|
|
|
:cond_4
|
|
move-object/from16 v11, p8
|
|
|
|
:goto_4
|
|
and-int/lit16 v1, v0, 0x100
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
move-object v12, v2
|
|
|
|
goto :goto_5
|
|
|
|
:cond_5
|
|
move-object/from16 v12, p9
|
|
|
|
:goto_5
|
|
and-int/lit16 v1, v0, 0x200
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
move-object v13, v2
|
|
|
|
goto :goto_6
|
|
|
|
:cond_6
|
|
move-object/from16 v13, p10
|
|
|
|
:goto_6
|
|
and-int/lit16 v1, v0, 0x400
|
|
|
|
if-eqz v1, :cond_7
|
|
|
|
const/4 v1, 0x5
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
move-object v14, v1
|
|
|
|
goto :goto_7
|
|
|
|
:cond_7
|
|
move-object/from16 v14, p11
|
|
|
|
:goto_7
|
|
and-int/lit16 v1, v0, 0x800
|
|
|
|
if-eqz v1, :cond_8
|
|
|
|
const-class v1, Lcom/discord/widgets/home/WidgetHome;
|
|
|
|
invoke-static {v1}, Ly/m/c/u;->getOrCreateKotlinClass(Ljava/lang/Class;)Ly/q/b;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1}, Lf/h/a/f/f/n/f;->listOf(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
move-object v15, v1
|
|
|
|
goto :goto_8
|
|
|
|
:cond_8
|
|
move-object/from16 v15, p12
|
|
|
|
:goto_8
|
|
and-int/lit16 v0, v0, 0x1000
|
|
|
|
if-eqz v0, :cond_9
|
|
|
|
sget-object v0, Lcom/discord/widgets/notice/NoticePopup$enqueue$1;->INSTANCE:Lcom/discord/widgets/notice/NoticePopup$enqueue$1;
|
|
|
|
move-object/from16 v16, v0
|
|
|
|
goto :goto_9
|
|
|
|
:cond_9
|
|
move-object/from16 v16, p13
|
|
|
|
:goto_9
|
|
move-object/from16 v3, p0
|
|
|
|
move-object/from16 v4, p1
|
|
|
|
move-object/from16 v5, p2
|
|
|
|
move-object/from16 v7, p4
|
|
|
|
move-object/from16 v17, p14
|
|
|
|
invoke-virtual/range {v3 .. v17}, Lcom/discord/widgets/notice/NoticePopup;->enqueue(Ljava/lang/String;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/graphics/drawable/Drawable;Ljava/lang/String;Landroid/graphics/drawable/Drawable;Ljava/lang/String;Ljava/lang/Integer;Landroid/graphics/drawable/Drawable;Ljava/lang/Integer;Ljava/util/List;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getAutoDismissAnimator(Ljava/lang/Integer;Lkotlin/jvm/functions/Function0;)Landroid/animation/ValueAnimator;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/Integer;",
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"Lkotlin/Unit;",
|
|
">;)",
|
|
"Landroid/animation/ValueAnimator;"
|
|
}
|
|
.end annotation
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
const/4 v0, 0x2
|
|
|
|
new-array v0, v0, [I
|
|
|
|
fill-array-data v0, :array_0
|
|
|
|
invoke-static {v0}, Landroid/animation/ObjectAnimator;->ofInt([I)Landroid/animation/ValueAnimator;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/widgets/notice/NoticePopup$getAutoDismissAnimator$animatorListener$1;
|
|
|
|
invoke-direct {v1, p2}, Lcom/discord/widgets/notice/NoticePopup$getAutoDismissAnimator$animatorListener$1;-><init>(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
const-string p2, "animator"
|
|
|
|
invoke-static {v0, p2}, Ly/m/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance p2, Landroid/view/animation/LinearInterpolator;
|
|
|
|
invoke-direct {p2}, Landroid/view/animation/LinearInterpolator;-><init>()V
|
|
|
|
invoke-virtual {v0, p2}, Landroid/animation/ValueAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result p1
|
|
|
|
int-to-long p1, p1
|
|
|
|
const-wide/16 v2, 0x3e8
|
|
|
|
mul-long p1, p1, v2
|
|
|
|
invoke-virtual {v0, p1, p2}, Landroid/animation/ValueAnimator;->setDuration(J)Landroid/animation/ValueAnimator;
|
|
|
|
invoke-virtual {v0, v1}, Landroid/animation/ValueAnimator;->addListener(Landroid/animation/Animator$AnimatorListener;)V
|
|
|
|
invoke-virtual {v0}, Landroid/animation/ValueAnimator;->start()V
|
|
|
|
return-object v0
|
|
|
|
nop
|
|
|
|
:array_0
|
|
.array-data 4
|
|
0x0
|
|
0x1
|
|
.end array-data
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final enqueue(Ljava/lang/String;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/graphics/drawable/Drawable;Ljava/lang/String;Landroid/graphics/drawable/Drawable;Ljava/lang/String;Ljava/lang/Integer;Landroid/graphics/drawable/Drawable;Ljava/lang/Integer;Ljava/util/List;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V
|
|
.locals 18
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/CharSequence;",
|
|
"Ljava/lang/CharSequence;",
|
|
"Ljava/lang/CharSequence;",
|
|
"Landroid/graphics/drawable/Drawable;",
|
|
"Ljava/lang/String;",
|
|
"Landroid/graphics/drawable/Drawable;",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/Integer;",
|
|
"Landroid/graphics/drawable/Drawable;",
|
|
"Ljava/lang/Integer;",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Ly/q/b<",
|
|
"+",
|
|
"Lcom/discord/app/AppComponent;",
|
|
">;>;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Landroid/view/View;",
|
|
"Lkotlin/Unit;",
|
|
">;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Landroid/view/View;",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "noticeName"
|
|
|
|
move-object/from16 v15, p1
|
|
|
|
invoke-static {v15, v0}, Ly/m/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string/jumbo v0, "validScreens"
|
|
|
|
move-object/from16 v14, p12
|
|
|
|
invoke-static {v14, v0}, Ly/m/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "onClickTopRightIcon"
|
|
|
|
move-object/from16 v13, p13
|
|
|
|
invoke-static {v13, v0}, Ly/m/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "onClick"
|
|
|
|
move-object/from16 v2, p14
|
|
|
|
invoke-static {v2, v0}, Ly/m/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreNotices$Notice;
|
|
|
|
new-instance v16, Lcom/discord/widgets/notice/NoticePopup$enqueue$notice$1;
|
|
|
|
move-object/from16 v1, v16
|
|
|
|
move-object/from16 v3, p1
|
|
|
|
move-object/from16 v4, p11
|
|
|
|
move-object/from16 v5, p8
|
|
|
|
move-object/from16 v6, p9
|
|
|
|
move-object/from16 v7, p6
|
|
|
|
move-object/from16 v8, p7
|
|
|
|
move-object/from16 v9, p5
|
|
|
|
move-object/from16 v10, p2
|
|
|
|
move-object/from16 v11, p3
|
|
|
|
move-object/from16 v12, p4
|
|
|
|
move-object/from16 v13, p10
|
|
|
|
move-object/from16 v14, p13
|
|
|
|
invoke-direct/range {v1 .. v14}, Lcom/discord/widgets/notice/NoticePopup$enqueue$notice$1;-><init>(Lkotlin/jvm/functions/Function1;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/graphics/drawable/Drawable;Lkotlin/jvm/functions/Function1;)V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
const/4 v6, 0x1
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const-wide/16 v9, 0x3e8
|
|
|
|
const-wide/16 v11, 0x0
|
|
|
|
const/16 v14, 0x16
|
|
|
|
const/16 v17, 0x0
|
|
|
|
move-object v1, v0
|
|
|
|
move-object/from16 v2, p1
|
|
|
|
move-object/from16 v8, p12
|
|
|
|
move-object/from16 v13, v16
|
|
|
|
move-object/from16 v15, v17
|
|
|
|
invoke-direct/range {v1 .. v15}, Lcom/discord/stores/StoreNotices$Notice;-><init>(Ljava/lang/String;Lcom/discord/utilities/time/Clock;JIZLjava/util/List;JJLkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreStream$Companion;->getNotices()Lcom/discord/stores/StoreNotices;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, v0}, Lcom/discord/stores/StoreNotices;->requestToShow(Lcom/discord/stores/StoreNotices$Notice;)V
|
|
|
|
return-void
|
|
.end method
|