alexandroid/decompiled/jadx/sources/androidx/compose/material/pullrefresh/PullRefreshNestedScrollConnection.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

107 lines
8.1 KiB
Java

package androidx.compose.material.pullrefresh;
import androidx.compose.ui.geometry.Offset;
import androidx.compose.ui.geometry.OffsetKt;
import androidx.compose.ui.input.nestedscroll.NestedScrollConnection;
import androidx.compose.ui.input.nestedscroll.NestedScrollSource;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import org.jetbrains.annotations.NotNull;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@Metadata(d1 = {"\u0000J\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0007\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0002\u0018\u00002\u00020\u0001Bc\u0012!\u0010\u0002\u001a\u001d\u0012\u0013\u0012\u00110\u0004¢\u0006\f\b\u0005\u0012\b\b\u0006\u0012\u0004\b\b(\u0007\u0012\u0004\u0012\u00020\u00040\u0003\u00121\u0010\b\u001a-\b\u0001\u0012\u0013\u0012\u00110\u0004¢\u0006\f\b\u0005\u0012\b\b\u0006\u0012\u0004\b\b(\n\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b\u0012\u0006\u0012\u0004\u0018\u00010\f0\t\u0012\u0006\u0010\r\u001a\u00020\u000e¢\u0006\u0002\u0010\u000fJ*\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u00122\u0006\u0010\u0014\u001a\u00020\u00122\u0006\u0010\u0015\u001a\u00020\u0016H\u0016ø\u0001\u0000¢\u0006\u0004\b\u0017\u0010\u0018J\u001b\u0010\u0019\u001a\u00020\u001a2\u0006\u0010\u0014\u001a\u00020\u001aH\u0096@ø\u0001\u0000¢\u0006\u0004\b\u001b\u0010\u001cJ\"\u0010\u001d\u001a\u00020\u00122\u0006\u0010\u0014\u001a\u00020\u00122\u0006\u0010\u0015\u001a\u00020\u0016H\u0016ø\u0001\u0000¢\u0006\u0004\b\u001e\u0010\u001fR\u000e\u0010\r\u001a\u00020\u000eX\u0082\u0004¢\u0006\u0002\n\u0000R)\u0010\u0002\u001a\u001d\u0012\u0013\u0012\u00110\u0004¢\u0006\f\b\u0005\u0012\b\b\u0006\u0012\u0004\b\b(\u0007\u0012\u0004\u0012\u00020\u00040\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R;\u0010\b\u001a-\b\u0001\u0012\u0013\u0012\u00110\u0004¢\u0006\f\b\u0005\u0012\b\b\u0006\u0012\u0004\b\b(\n\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u000b\u0012\u0006\u0012\u0004\u0018\u00010\f0\tX\u0082\u0004¢\u0006\u0004\n\u0002\u0010\u0010\u0082\u0002\u0007\n\u0005\b¡\u001e0\u0001¨\u0006 "}, d2 = {"Landroidx/compose/material/pullrefresh/PullRefreshNestedScrollConnection;", "Landroidx/compose/ui/input/nestedscroll/NestedScrollConnection;", "onPull", "Lkotlin/Function1;", "", "Lkotlin/ParameterName;", "name", "pullDelta", "onRelease", "Lkotlin/Function2;", "flingVelocity", "Lkotlin/coroutines/Continuation;", "", "enabled", "", "(Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Z)V", "Lkotlin/jvm/functions/Function2;", "onPostScroll", "Landroidx/compose/ui/geometry/Offset;", "consumed", "available", "source", "Landroidx/compose/ui/input/nestedscroll/NestedScrollSource;", "onPostScroll-DzOQY0M", "(JJI)J", "onPreFling", "Landroidx/compose/ui/unit/Velocity;", "onPreFling-QWom1Mo", "(JLkotlin/coroutines/Continuation;)Ljava/lang/Object;", "onPreScroll", "onPreScroll-OzD1aCk", "(JI)J", "material_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
final class PullRefreshNestedScrollConnection implements NestedScrollConnection {
private final boolean enabled;
@NotNull
private final Function1<Float, Float> onPull;
@NotNull
private final Function2<Float, Continuation<? super Float>, Object> onRelease;
/* JADX WARN: Multi-variable type inference failed */
public PullRefreshNestedScrollConnection(@NotNull Function1<? super Float, Float> function1, @NotNull Function2<? super Float, ? super Continuation<? super Float>, ? extends Object> function2, boolean z) {
this.onPull = function1;
this.onRelease = function2;
this.enabled = z;
}
@Override // androidx.compose.ui.input.nestedscroll.NestedScrollConnection
/* renamed from: onPostScroll-DzOQY0M */
public long mo667onPostScrollDzOQY0M(long consumed, long available, int source) {
return !this.enabled ? Offset.INSTANCE.m4416getZeroF1C5BW0() : (!NestedScrollSource.m5823equalsimpl0(source, NestedScrollSource.INSTANCE.m5835getUserInputWNlRxjI()) || Offset.m4401getYimpl(available) <= 0.0f) ? Offset.INSTANCE.m4416getZeroF1C5BW0() : OffsetKt.Offset(0.0f, this.onPull.invoke(Float.valueOf(Offset.m4401getYimpl(available))).floatValue());
}
/* JADX WARN: Removed duplicated region for block: B:15:0x0033 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0023 */
@Override // androidx.compose.ui.input.nestedscroll.NestedScrollConnection
@org.jetbrains.annotations.Nullable
/* renamed from: onPreFling-QWom1Mo */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.lang.Object mo940onPreFlingQWom1Mo(long r5, @org.jetbrains.annotations.NotNull kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity> r7) {
/*
r4 = this;
boolean r0 = r7 instanceof androidx.compose.material.pullrefresh.PullRefreshNestedScrollConnection$onPreFling$1
if (r0 == 0) goto L13
r0 = r7
androidx.compose.material.pullrefresh.PullRefreshNestedScrollConnection$onPreFling$1 r0 = (androidx.compose.material.pullrefresh.PullRefreshNestedScrollConnection$onPreFling$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
androidx.compose.material.pullrefresh.PullRefreshNestedScrollConnection$onPreFling$1 r0 = new androidx.compose.material.pullrefresh.PullRefreshNestedScrollConnection$onPreFling$1
r0.<init>(r4, r7)
L18:
java.lang.Object r7 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L33
if (r2 != r3) goto L2b
float r4 = r0.F$0
kotlin.ResultKt.throwOnFailure(r7)
goto L4d
L2b:
java.lang.String r4 = "call to 'resume' before 'invoke' with coroutine"
rx.Single$$ExternalSyntheticBUOutline0.m$2(r4)
r4 = 0
return r4
L33:
kotlin.ResultKt.throwOnFailure(r7)
kotlin.jvm.functions.Function2<java.lang.Float, kotlin.coroutines.Continuation<? super java.lang.Float>, java.lang.Object> r4 = r4.onRelease
float r5 = androidx.compose.ui.unit.Velocity.m7607getYimpl(r5)
java.lang.Float r5 = kotlin.coroutines.jvm.internal.Boxing.boxFloat(r5)
r6 = 0
r0.F$0 = r6
r0.label = r3
java.lang.Object r7 = r4.invoke(r5, r0)
if (r7 != r1) goto L4c
return r1
L4c:
r4 = r6
L4d:
java.lang.Number r7 = (java.lang.Number) r7
float r5 = r7.floatValue()
long r4 = androidx.compose.ui.unit.VelocityKt.Velocity(r4, r5)
androidx.compose.ui.unit.Velocity r4 = androidx.compose.ui.unit.Velocity.m7597boximpl(r4)
return r4
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.material.pullrefresh.PullRefreshNestedScrollConnection.mo940onPreFlingQWom1Mo(long, kotlin.coroutines.Continuation):java.lang.Object");
}
@Override // androidx.compose.ui.input.nestedscroll.NestedScrollConnection
/* renamed from: onPreScroll-OzD1aCk */
public long mo941onPreScrollOzD1aCk(long available, int source) {
return !this.enabled ? Offset.INSTANCE.m4416getZeroF1C5BW0() : (!NestedScrollSource.m5823equalsimpl0(source, NestedScrollSource.INSTANCE.m5835getUserInputWNlRxjI()) || Offset.m4401getYimpl(available) >= 0.0f) ? Offset.INSTANCE.m4416getZeroF1C5BW0() : OffsetKt.Offset(0.0f, this.onPull.invoke(Float.valueOf(Offset.m4401getYimpl(available))).floatValue());
}
}