181 lines
4.7 KiB
Smali
181 lines
4.7 KiB
Smali
|
.class public final Lcom/discord/widgets/tabs/PanelsChildGestureRegionObserver;
|
||
|
.super Ljava/lang/Object;
|
||
|
.source "PanelsChildGestureRegionObserver.kt"
|
||
|
|
||
|
# interfaces
|
||
|
.implements Landroid/view/View$OnLayoutChangeListener;
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation system Ldalvik/annotation/MemberClasses;
|
||
|
value = {
|
||
|
Lcom/discord/widgets/tabs/PanelsChildGestureRegionObserver$Provider;
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field public final gestureRegionsSubject:Lrx/subjects/BehaviorSubject;
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"Lrx/subjects/BehaviorSubject<",
|
||
|
"Ljava/util/List<",
|
||
|
"Landroid/graphics/Rect;",
|
||
|
">;>;"
|
||
|
}
|
||
|
.end annotation
|
||
|
.end field
|
||
|
|
||
|
.field public viewIdToGestureRegionMap:Ljava/util/Map;
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"Ljava/util/Map<",
|
||
|
"Ljava/lang/Integer;",
|
||
|
"Landroid/graphics/Rect;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
.end field
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method public constructor <init>()V
|
||
|
.locals 1
|
||
|
|
||
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||
|
|
||
|
new-instance v0, Ljava/util/LinkedHashMap;
|
||
|
|
||
|
invoke-direct {v0}, Ljava/util/LinkedHashMap;-><init>()V
|
||
|
|
||
|
iput-object v0, p0, Lcom/discord/widgets/tabs/PanelsChildGestureRegionObserver;->viewIdToGestureRegionMap:Ljava/util/Map;
|
||
|
|
||
|
sget-object v0, Ly/q/o;->d:Ly/q/o;
|
||
|
|
||
|
invoke-static {v0}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
iput-object v0, p0, Lcom/discord/widgets/tabs/PanelsChildGestureRegionObserver;->gestureRegionsSubject:Lrx/subjects/BehaviorSubject;
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method private final publishGestureRegionsUpdate()V
|
||
|
.locals 2
|
||
|
|
||
|
iget-object v0, p0, Lcom/discord/widgets/tabs/PanelsChildGestureRegionObserver;->gestureRegionsSubject:Lrx/subjects/BehaviorSubject;
|
||
|
|
||
|
iget-object v1, p0, Lcom/discord/widgets/tabs/PanelsChildGestureRegionObserver;->viewIdToGestureRegionMap:Ljava/util/Map;
|
||
|
|
||
|
invoke-interface {v1}, Ljava/util/Map;->values()Ljava/util/Collection;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-static {v1}, Ly/q/l;->toList(Ljava/lang/Iterable;)Ljava/util/List;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public final observeGestureRegions()Lrx/Observable;
|
||
|
.locals 2
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"()",
|
||
|
"Lrx/Observable<",
|
||
|
"Ljava/util/List<",
|
||
|
"Landroid/graphics/Rect;",
|
||
|
">;>;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
iget-object v0, p0, Lcom/discord/widgets/tabs/PanelsChildGestureRegionObserver;->gestureRegionsSubject:Lrx/subjects/BehaviorSubject;
|
||
|
|
||
|
const-string v1, "gestureRegionsSubject"
|
||
|
|
||
|
invoke-static {v0, v1}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public onLayoutChange(Landroid/view/View;IIIIIIII)V
|
||
|
.locals 0
|
||
|
|
||
|
if-eqz p1, :cond_0
|
||
|
|
||
|
const/4 p6, 0x2
|
||
|
|
||
|
new-array p6, p6, [I
|
||
|
|
||
|
fill-array-data p6, :array_0
|
||
|
|
||
|
invoke-virtual {p1, p6}, Landroid/view/View;->getLocationOnScreen([I)V
|
||
|
|
||
|
const/4 p7, 0x0
|
||
|
|
||
|
aget p7, p6, p7
|
||
|
|
||
|
const/4 p8, 0x1
|
||
|
|
||
|
aget p6, p6, p8
|
||
|
|
||
|
add-int/2addr p2, p7
|
||
|
|
||
|
add-int/2addr p3, p6
|
||
|
|
||
|
add-int/2addr p7, p4
|
||
|
|
||
|
add-int/2addr p6, p5
|
||
|
|
||
|
iget-object p4, p0, Lcom/discord/widgets/tabs/PanelsChildGestureRegionObserver;->viewIdToGestureRegionMap:Ljava/util/Map;
|
||
|
|
||
|
invoke-virtual {p1}, Landroid/view/View;->getId()I
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
new-instance p5, Landroid/graphics/Rect;
|
||
|
|
||
|
invoke-direct {p5, p2, p3, p7, p6}, Landroid/graphics/Rect;-><init>(IIII)V
|
||
|
|
||
|
invoke-interface {p4, p1, p5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
invoke-direct {p0}, Lcom/discord/widgets/tabs/PanelsChildGestureRegionObserver;->publishGestureRegionsUpdate()V
|
||
|
|
||
|
:cond_0
|
||
|
return-void
|
||
|
|
||
|
nop
|
||
|
|
||
|
:array_0
|
||
|
.array-data 4
|
||
|
0x0
|
||
|
0x0
|
||
|
.end array-data
|
||
|
.end method
|
||
|
|
||
|
.method public final remove(I)V
|
||
|
.locals 1
|
||
|
|
||
|
iget-object v0, p0, Lcom/discord/widgets/tabs/PanelsChildGestureRegionObserver;->viewIdToGestureRegionMap:Ljava/util/Map;
|
||
|
|
||
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-interface {v0, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
invoke-direct {p0}, Lcom/discord/widgets/tabs/PanelsChildGestureRegionObserver;->publishGestureRegionsUpdate()V
|
||
|
|
||
|
return-void
|
||
|
.end method
|