Initial version -- added millennium read funcionality
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
package com.sistemasolton.itranvias.home.presentation.lines;
|
||||
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
|
||||
/* JADX INFO: compiled from: LazyDsl.kt */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
@Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
|
||||
public final class LinesScreenKt$LinesList$lambda$13$lambda$12$$inlined$items$default$2 implements Function1<Integer, Object> {
|
||||
final /* synthetic */ List $items;
|
||||
final /* synthetic */ Function1 $key;
|
||||
|
||||
public LinesScreenKt$LinesList$lambda$13$lambda$12$$inlined$items$default$2(Function1 function1, List list) {
|
||||
this.$key = function1;
|
||||
this.$items = list;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public /* bridge */ /* synthetic */ Object invoke(Integer num) {
|
||||
return invoke(num.intValue());
|
||||
}
|
||||
|
||||
public final Object invoke(int i) {
|
||||
return this.$key.invoke(this.$items.get(i));
|
||||
}
|
||||
}
|
||||
+549
@@ -0,0 +1,549 @@
|
||||
package com.sistemasolton.itranvias.home.presentation.lines;
|
||||
|
||||
import androidx.compose.foundation.BackgroundKt;
|
||||
import androidx.compose.foundation.ClickableKt;
|
||||
import androidx.compose.foundation.layout.Arrangement;
|
||||
import androidx.compose.foundation.layout.BoxKt;
|
||||
import androidx.compose.foundation.layout.BoxScopeInstance;
|
||||
import androidx.compose.foundation.layout.ColumnKt;
|
||||
import androidx.compose.foundation.layout.ColumnScopeInstance;
|
||||
import androidx.compose.foundation.layout.PaddingKt;
|
||||
import androidx.compose.foundation.layout.RowKt;
|
||||
import androidx.compose.foundation.layout.RowScope;
|
||||
import androidx.compose.foundation.layout.RowScopeInstance;
|
||||
import androidx.compose.foundation.layout.SizeKt;
|
||||
import androidx.compose.foundation.layout.SpacerKt;
|
||||
import androidx.compose.foundation.lazy.LazyDslKt;
|
||||
import androidx.compose.foundation.lazy.LazyItemScope;
|
||||
import androidx.compose.foundation.lazy.LazyListScope;
|
||||
import androidx.compose.foundation.shape.RoundedCornerShapeKt;
|
||||
import androidx.compose.material3.MaterialTheme;
|
||||
import androidx.compose.material3.TextKt;
|
||||
import androidx.compose.runtime.Applier;
|
||||
import androidx.compose.runtime.ComposablesKt;
|
||||
import androidx.compose.runtime.Composer;
|
||||
import androidx.compose.runtime.ComposerKt;
|
||||
import androidx.compose.runtime.CompositionLocalMap;
|
||||
import androidx.compose.runtime.RecomposeScopeImplKt;
|
||||
import androidx.compose.runtime.ScopeUpdateScope;
|
||||
import androidx.compose.runtime.Updater;
|
||||
import androidx.compose.runtime.internal.ComposableLambdaKt;
|
||||
import androidx.compose.ui.Alignment;
|
||||
import androidx.compose.ui.ComposedModifierKt;
|
||||
import androidx.compose.ui.Modifier;
|
||||
import androidx.compose.ui.graphics.Color;
|
||||
import androidx.compose.ui.graphics.ColorKt;
|
||||
import androidx.compose.ui.layout.MeasurePolicy;
|
||||
import androidx.compose.ui.node.ComposeUiNode;
|
||||
import androidx.compose.ui.semantics.Role;
|
||||
import androidx.compose.ui.semantics.SemanticsModifierKt;
|
||||
import androidx.compose.ui.semantics.SemanticsPropertiesKt;
|
||||
import androidx.compose.ui.semantics.SemanticsPropertyReceiver;
|
||||
import androidx.compose.ui.text.TextLayoutResult;
|
||||
import androidx.compose.ui.text.TextStyle;
|
||||
import androidx.compose.ui.text.font.FontFamily;
|
||||
import androidx.compose.ui.text.font.FontStyle;
|
||||
import androidx.compose.ui.text.font.FontWeight;
|
||||
import androidx.compose.ui.text.style.TextAlign;
|
||||
import androidx.compose.ui.text.style.TextDecoration;
|
||||
import androidx.compose.ui.unit.Dp;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
import androidx.lifecycle.ViewModelStoreOwner;
|
||||
import androidx.lifecycle.viewmodel.compose.LocalViewModelStoreOwner;
|
||||
import androidx.profileinstaller.ProfileVerifier;
|
||||
import com.sistemasolton.itranvias.core.presentation.ConnectionErrorScreenKt;
|
||||
import com.sistemasolton.itranvias.core.presentation.LoadingScreenKt;
|
||||
import com.sistemasolton.itranvias.home.data.remote.dto.infodto.InfoDto;
|
||||
import com.sistemasolton.itranvias.home.data.remote.dto.infodto.LineaDto;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.collections.ArraysKt;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.functions.Function4;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import kotlin.text.CharsKt;
|
||||
import kotlin.text.MatchResult;
|
||||
import kotlin.text.Regex;
|
||||
import kotlin.text.StringsKt;
|
||||
import org.koin.compose.KoinApplicationKt;
|
||||
import org.koin.viewmodel.CreationExtrasExtKt;
|
||||
import org.koin.viewmodel.GetViewModelKt;
|
||||
|
||||
/* JADX INFO: compiled from: LinesScreen.kt */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
@Metadata(d1 = {"\u0000$\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0003\u001a!\u0010\u0000\u001a\u00020\u00012\u0012\u0010\u0002\u001a\u000e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u00010\u0003H\u0007¢\u0006\u0002\u0010\u0005\u001a)\u0010\u0006\u001a\u00020\u00012\u0006\u0010\u0007\u001a\u00020\b2\u0012\u0010\u0002\u001a\u000e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u00010\u0003H\u0007¢\u0006\u0002\u0010\t\u001a\u000e\u0010\n\u001a\u00020\u00042\u0006\u0010\u000b\u001a\u00020\u0004\u001a\u0013\u0010\f\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\u0004¢\u0006\u0002\u0010\u000f¨\u0006\u0010"}, d2 = {"LinesScreen", "", "onLineDetail", "Lkotlin/Function1;", "", "(Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;I)V", "LinesList", "infoDto", "Lcom/sistemasolton/itranvias/home/data/remote/dto/infodto/InfoDto;", "(Lcom/sistemasolton/itranvias/home/data/remote/dto/infodto/InfoDto;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;I)V", "formatLineNameForAccessibility", "lineComer", "parseColorSafely", "Landroidx/compose/ui/graphics/Color;", "hex", "(Ljava/lang/String;)J", "composeApp_release"}, k = 2, mv = {2, 1, 0}, xi = 48)
|
||||
public final class LinesScreenKt {
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final Unit LinesList$lambda$14(InfoDto infoDto, Function1 function1, int i, Composer composer, int i2) {
|
||||
LinesList(infoDto, function1, composer, RecomposeScopeImplKt.updateChangedFlags(i | 1));
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final Unit LinesScreen$lambda$3(Function1 function1, int i, Composer composer, int i2) {
|
||||
LinesScreen(function1, composer, RecomposeScopeImplKt.updateChangedFlags(i | 1));
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* JADX WARN: Type inference fix 'apply assigned field type' failed
|
||||
java.lang.UnsupportedOperationException: ArgType.getObject(), call class: class jadx.core.dex.instructions.args.ArgType$PrimitiveArg
|
||||
at jadx.core.dex.instructions.args.ArgType.getObject(ArgType.java:593)
|
||||
at jadx.core.dex.attributes.nodes.ClassTypeVarsAttr.getTypeVarsMapFor(ClassTypeVarsAttr.java:35)
|
||||
at jadx.core.dex.nodes.utils.TypeUtils.replaceClassGenerics(TypeUtils.java:177)
|
||||
at jadx.core.dex.visitors.typeinference.FixTypesVisitor.insertExplicitUseCast(FixTypesVisitor.java:397)
|
||||
at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryFieldTypeWithNewCasts(FixTypesVisitor.java:359)
|
||||
at jadx.core.dex.visitors.typeinference.FixTypesVisitor.applyFieldType(FixTypesVisitor.java:309)
|
||||
at jadx.core.dex.visitors.typeinference.FixTypesVisitor.visit(FixTypesVisitor.java:94)
|
||||
*/
|
||||
public static final void LinesScreen(final Function1<? super String, Unit> onLineDetail, Composer composer, final int i) {
|
||||
int i2;
|
||||
Intrinsics.checkNotNullParameter(onLineDetail, "onLineDetail");
|
||||
Composer composerStartRestartGroup = composer.startRestartGroup(1699743212);
|
||||
if ((i & 6) == 0) {
|
||||
i2 = (composerStartRestartGroup.changedInstance(onLineDetail) ? 4 : 2) | i;
|
||||
} else {
|
||||
i2 = i;
|
||||
}
|
||||
if ((i2 & 3) != 2 || !composerStartRestartGroup.getSkipping()) {
|
||||
if (ComposerKt.isTraceInProgress()) {
|
||||
ComposerKt.traceEventStart(1699743212, i2, -1, "com.sistemasolton.itranvias.home.presentation.lines.LinesScreen (LinesScreen.kt:42)");
|
||||
}
|
||||
composerStartRestartGroup.startReplaceGroup(-924953623);
|
||||
ViewModelStoreOwner current = LocalViewModelStoreOwner.INSTANCE.getCurrent(composerStartRestartGroup, LocalViewModelStoreOwner.$stable);
|
||||
if (current == null) {
|
||||
throw new IllegalStateException("No ViewModelStoreOwner was provided via LocalViewModelStoreOwner".toString());
|
||||
}
|
||||
ViewModel viewModelResolveViewModel = GetViewModelKt.resolveViewModel(Reflection.getOrCreateKotlinClass(LinesViewModel.class), current.getViewModelStore(), null, CreationExtrasExtKt.defaultExtras(current), null, KoinApplicationKt.currentKoinScope(composerStartRestartGroup, 0), null);
|
||||
composerStartRestartGroup.endReplaceGroup();
|
||||
final LinesViewModel linesViewModel = (LinesViewModel) viewModelResolveViewModel;
|
||||
LinesState state = linesViewModel.getState();
|
||||
if (state.isLoading()) {
|
||||
composerStartRestartGroup.startReplaceGroup(-614165745);
|
||||
LoadingScreenKt.LoadingScreen(composerStartRestartGroup, 0);
|
||||
composerStartRestartGroup.endReplaceGroup();
|
||||
} else if (!state.isError()) {
|
||||
if (state.getInfoDto() != null) {
|
||||
composerStartRestartGroup.startReplaceGroup(-613983279);
|
||||
Modifier modifierM832padding3ABfNKs = PaddingKt.m832padding3ABfNKs(BackgroundKt.m257backgroundbw27NRU$default(SizeKt.fillMaxSize$default(Modifier.INSTANCE, 0.0f, 1, null), MaterialTheme.INSTANCE.getColorScheme(composerStartRestartGroup, MaterialTheme.$stable).getBackground(), null, 2, null), Dp.m7215constructorimpl(16));
|
||||
ComposerKt.sourceInformationMarkerStart(composerStartRestartGroup, 1341605231, "CC(Column)N(modifier,verticalArrangement,horizontalAlignment,content)87@4443L61,88@4509L134:Column.kt#2w3rfo");
|
||||
MeasurePolicy measurePolicyColumnMeasurePolicy = ColumnKt.columnMeasurePolicy(Arrangement.INSTANCE.getTop(), Alignment.INSTANCE.getStart(), composerStartRestartGroup, 0);
|
||||
ComposerKt.sourceInformationMarkerStart(composerStartRestartGroup, -1159599143, "CC(Layout)P(!1,2)80@3267L27,83@3433L360:Layout.kt#80mrfh");
|
||||
int iHashCode = Long.hashCode(ComposablesKt.getCurrentCompositeKeyHashCode(composerStartRestartGroup, 0));
|
||||
CompositionLocalMap currentCompositionLocalMap = composerStartRestartGroup.getCurrentCompositionLocalMap();
|
||||
Modifier modifierMaterializeModifier = ComposedModifierKt.materializeModifier(composerStartRestartGroup, modifierM832padding3ABfNKs);
|
||||
Function0<ComposeUiNode> constructor = ComposeUiNode.INSTANCE.getConstructor();
|
||||
ComposerKt.sourceInformationMarkerStart(composerStartRestartGroup, -553112988, "CC(ReusableComposeNode)N(factory,update,content)399@15590L9:Composables.kt#9igjgp");
|
||||
if (!(composerStartRestartGroup.getApplier() instanceof Applier)) {
|
||||
ComposablesKt.invalidApplier();
|
||||
}
|
||||
composerStartRestartGroup.startReusableNode();
|
||||
if (composerStartRestartGroup.getInserting()) {
|
||||
composerStartRestartGroup.createNode(constructor);
|
||||
} else {
|
||||
composerStartRestartGroup.useNode();
|
||||
}
|
||||
Composer composerM3820constructorimpl = Updater.m3820constructorimpl(composerStartRestartGroup);
|
||||
Updater.m3827setimpl(composerM3820constructorimpl, measurePolicyColumnMeasurePolicy, ComposeUiNode.INSTANCE.getSetMeasurePolicy());
|
||||
Updater.m3827setimpl(composerM3820constructorimpl, currentCompositionLocalMap, ComposeUiNode.INSTANCE.getSetResolvedCompositionLocals());
|
||||
Function2<ComposeUiNode, Integer, Unit> setCompositeKeyHash = ComposeUiNode.INSTANCE.getSetCompositeKeyHash();
|
||||
if (composerM3820constructorimpl.getInserting() || !Intrinsics.areEqual(composerM3820constructorimpl.rememberedValue(), Integer.valueOf(iHashCode))) {
|
||||
composerM3820constructorimpl.updateRememberedValue(Integer.valueOf(iHashCode));
|
||||
composerM3820constructorimpl.apply(Integer.valueOf(iHashCode), setCompositeKeyHash);
|
||||
}
|
||||
Updater.m3827setimpl(composerM3820constructorimpl, modifierMaterializeModifier, ComposeUiNode.INSTANCE.getSetModifier());
|
||||
ComposerKt.sourceInformationMarkerStart(composerStartRestartGroup, 2093002350, "C89@4557L9:Column.kt#2w3rfo");
|
||||
ColumnScopeInstance columnScopeInstance = ColumnScopeInstance.INSTANCE;
|
||||
LinesList(state.getInfoDto(), onLineDetail, composerStartRestartGroup, (i2 << 3) & 112);
|
||||
ComposerKt.sourceInformationMarkerEnd(composerStartRestartGroup);
|
||||
composerStartRestartGroup.endNode();
|
||||
ComposerKt.sourceInformationMarkerEnd(composerStartRestartGroup);
|
||||
ComposerKt.sourceInformationMarkerEnd(composerStartRestartGroup);
|
||||
ComposerKt.sourceInformationMarkerEnd(composerStartRestartGroup);
|
||||
composerStartRestartGroup.endReplaceGroup();
|
||||
} else {
|
||||
composerStartRestartGroup.startReplaceGroup(-613695754);
|
||||
composerStartRestartGroup.endReplaceGroup();
|
||||
}
|
||||
} else {
|
||||
composerStartRestartGroup.startReplaceGroup(-614099157);
|
||||
composerStartRestartGroup.startReplaceGroup(5004770);
|
||||
boolean zChangedInstance = composerStartRestartGroup.changedInstance(linesViewModel);
|
||||
Object objRememberedValue = composerStartRestartGroup.rememberedValue();
|
||||
if (zChangedInstance || objRememberedValue == Composer.INSTANCE.getEmpty()) {
|
||||
objRememberedValue = new Function0() { // from class: com.sistemasolton.itranvias.home.presentation.lines.LinesScreenKt$$ExternalSyntheticLambda3
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final Object invoke() {
|
||||
return LinesScreenKt.LinesScreen$lambda$1$lambda$0(linesViewModel);
|
||||
}
|
||||
};
|
||||
composerStartRestartGroup.updateRememberedValue(objRememberedValue);
|
||||
}
|
||||
composerStartRestartGroup.endReplaceGroup();
|
||||
ConnectionErrorScreenKt.ConnectionErrorScreen(null, (Function0) objRememberedValue, composerStartRestartGroup, 0, 1);
|
||||
composerStartRestartGroup.endReplaceGroup();
|
||||
}
|
||||
if (ComposerKt.isTraceInProgress()) {
|
||||
ComposerKt.traceEventEnd();
|
||||
}
|
||||
} else {
|
||||
composerStartRestartGroup.skipToGroupEnd();
|
||||
}
|
||||
ScopeUpdateScope scopeUpdateScopeEndRestartGroup = composerStartRestartGroup.endRestartGroup();
|
||||
if (scopeUpdateScopeEndRestartGroup != null) {
|
||||
scopeUpdateScopeEndRestartGroup.updateScope(new Function2() { // from class: com.sistemasolton.itranvias.home.presentation.lines.LinesScreenKt$$ExternalSyntheticLambda4
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return LinesScreenKt.LinesScreen$lambda$3(onLineDetail, i, (Composer) obj, ((Integer) obj2).intValue());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final Unit LinesScreen$lambda$1$lambda$0(LinesViewModel linesViewModel) {
|
||||
linesViewModel.loadLocalInfo();
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
public static final void LinesList(final InfoDto infoDto, final Function1<? super String, Unit> onLineDetail, Composer composer, final int i) {
|
||||
int i2;
|
||||
Composer composer2;
|
||||
Intrinsics.checkNotNullParameter(infoDto, "infoDto");
|
||||
Intrinsics.checkNotNullParameter(onLineDetail, "onLineDetail");
|
||||
Composer composerStartRestartGroup = composer.startRestartGroup(1345443221);
|
||||
if ((i & 6) == 0) {
|
||||
i2 = (composerStartRestartGroup.changedInstance(infoDto) ? 4 : 2) | i;
|
||||
} else {
|
||||
i2 = i;
|
||||
}
|
||||
if ((i & 48) == 0) {
|
||||
i2 |= composerStartRestartGroup.changedInstance(onLineDetail) ? 32 : 16;
|
||||
}
|
||||
if ((i2 & 19) != 18 || !composerStartRestartGroup.getSkipping()) {
|
||||
if (ComposerKt.isTraceInProgress()) {
|
||||
ComposerKt.traceEventStart(1345443221, i2, -1, "com.sistemasolton.itranvias.home.presentation.lines.LinesList (LinesScreen.kt:69)");
|
||||
}
|
||||
final List<LineaDto> lineas = infoDto.getITranvias().getActualizacion().getLineas();
|
||||
Modifier.Companion companion = Modifier.INSTANCE;
|
||||
composerStartRestartGroup.startReplaceGroup(1849434622);
|
||||
Object objRememberedValue = composerStartRestartGroup.rememberedValue();
|
||||
if (objRememberedValue == Composer.INSTANCE.getEmpty()) {
|
||||
objRememberedValue = new Function1() { // from class: com.sistemasolton.itranvias.home.presentation.lines.LinesScreenKt$$ExternalSyntheticLambda0
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Object invoke(Object obj) {
|
||||
return LinesScreenKt.LinesList$lambda$5$lambda$4((SemanticsPropertyReceiver) obj);
|
||||
}
|
||||
};
|
||||
composerStartRestartGroup.updateRememberedValue(objRememberedValue);
|
||||
}
|
||||
composerStartRestartGroup.endReplaceGroup();
|
||||
Modifier modifierSemantics$default = SemanticsModifierKt.semantics$default(companion, false, (Function1) objRememberedValue, 1, null);
|
||||
composerStartRestartGroup.startReplaceGroup(-1633490746);
|
||||
boolean zChangedInstance = composerStartRestartGroup.changedInstance(lineas) | ((i2 & 112) == 32);
|
||||
Object objRememberedValue2 = composerStartRestartGroup.rememberedValue();
|
||||
if (zChangedInstance || objRememberedValue2 == Composer.INSTANCE.getEmpty()) {
|
||||
objRememberedValue2 = new Function1() { // from class: com.sistemasolton.itranvias.home.presentation.lines.LinesScreenKt$$ExternalSyntheticLambda1
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Object invoke(Object obj) {
|
||||
return LinesScreenKt.LinesList$lambda$13$lambda$12(lineas, onLineDetail, (LazyListScope) obj);
|
||||
}
|
||||
};
|
||||
composerStartRestartGroup.updateRememberedValue(objRememberedValue2);
|
||||
}
|
||||
composerStartRestartGroup.endReplaceGroup();
|
||||
composer2 = composerStartRestartGroup;
|
||||
LazyDslKt.LazyColumn(modifierSemantics$default, null, null, false, null, null, null, false, null, (Function1) objRememberedValue2, composerStartRestartGroup, 0, 510);
|
||||
if (ComposerKt.isTraceInProgress()) {
|
||||
ComposerKt.traceEventEnd();
|
||||
}
|
||||
} else {
|
||||
composerStartRestartGroup.skipToGroupEnd();
|
||||
composer2 = composerStartRestartGroup;
|
||||
}
|
||||
ScopeUpdateScope scopeUpdateScopeEndRestartGroup = composer2.endRestartGroup();
|
||||
if (scopeUpdateScopeEndRestartGroup != null) {
|
||||
scopeUpdateScopeEndRestartGroup.updateScope(new Function2() { // from class: com.sistemasolton.itranvias.home.presentation.lines.LinesScreenKt$$ExternalSyntheticLambda2
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return LinesScreenKt.LinesList$lambda$14(infoDto, onLineDetail, i, (Composer) obj, ((Integer) obj2).intValue());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final Unit LinesList$lambda$5$lambda$4(SemanticsPropertyReceiver semantics) {
|
||||
Intrinsics.checkNotNullParameter(semantics, "$this$semantics");
|
||||
SemanticsPropertiesKt.setContentDescription(semantics, "Lista de líneas de tranvía disponibles");
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
public static final String formatLineNameForAccessibility(String lineComer) {
|
||||
Intrinsics.checkNotNullParameter(lineComer, "lineComer");
|
||||
String upperCase = lineComer.toUpperCase(Locale.ROOT);
|
||||
Intrinsics.checkNotNullExpressionValue(upperCase, "toUpperCase(...)");
|
||||
String str = (String) MapsKt.mapOf(TuplesKt.to("BUH", "búho"), TuplesKt.to("UDC", "u de ce")).get(upperCase);
|
||||
if (str != null) {
|
||||
return str;
|
||||
}
|
||||
String str2 = upperCase;
|
||||
for (int i = 0; i < str2.length(); i++) {
|
||||
if (!Character.isDigit(str2.charAt(i))) {
|
||||
MatchResult matchResultMatchEntire = new Regex("^([0-9]+)([A-Z])$").matchEntire(str2);
|
||||
if (matchResultMatchEntire != null) {
|
||||
String str3 = matchResultMatchEntire.getGroupValues().get(1);
|
||||
String lowerCase = matchResultMatchEntire.getGroupValues().get(2).toLowerCase(Locale.ROOT);
|
||||
Intrinsics.checkNotNullExpressionValue(lowerCase, "toLowerCase(...)");
|
||||
return str3 + " " + lowerCase;
|
||||
}
|
||||
char[] charArray = upperCase.toCharArray();
|
||||
Intrinsics.checkNotNullExpressionValue(charArray, "toCharArray(...)");
|
||||
String lowerCase2 = ArraysKt.joinToString$default(charArray, (CharSequence) " ", (CharSequence) null, (CharSequence) null, 0, (CharSequence) null, (Function1) null, 62, (Object) null).toLowerCase(Locale.ROOT);
|
||||
Intrinsics.checkNotNullExpressionValue(lowerCase2, "toLowerCase(...)");
|
||||
return lowerCase2;
|
||||
}
|
||||
}
|
||||
return upperCase;
|
||||
}
|
||||
|
||||
public static final long parseColorSafely(String hex) {
|
||||
long j;
|
||||
Intrinsics.checkNotNullParameter(hex, "hex");
|
||||
try {
|
||||
String strRemovePrefix = StringsKt.removePrefix(hex, (CharSequence) "#");
|
||||
int length = strRemovePrefix.length();
|
||||
if (length == 6) {
|
||||
j = Long.parseLong(strRemovePrefix, CharsKt.checkRadix(16)) | 4278190080L;
|
||||
} else if (length == 8) {
|
||||
j = Long.parseLong(strRemovePrefix, CharsKt.checkRadix(16));
|
||||
} else {
|
||||
throw new IllegalArgumentException("Invalid color hex");
|
||||
}
|
||||
return ColorKt.Color(j);
|
||||
} catch (Exception unused) {
|
||||
return Color.INSTANCE.m4531getGray0d7_KjU();
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final Unit LinesList$lambda$13$lambda$12(final List list, final Function1 function1, LazyListScope LazyColumn) {
|
||||
Intrinsics.checkNotNullParameter(LazyColumn, "$this$LazyColumn");
|
||||
final LinesScreenKt$LinesList$lambda$13$lambda$12$$inlined$items$default$1 linesScreenKt$LinesList$lambda$13$lambda$12$$inlined$items$default$1 = new Function1() { // from class: com.sistemasolton.itranvias.home.presentation.lines.LinesScreenKt$LinesList$lambda$13$lambda$12$$inlined$items$default$1
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Void invoke(LineaDto lineaDto) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public /* bridge */ /* synthetic */ Object invoke(Object obj) {
|
||||
return invoke((LineaDto) obj);
|
||||
}
|
||||
};
|
||||
LazyColumn.items(list.size(), null, new Function1<Integer, Object>() { // from class: com.sistemasolton.itranvias.home.presentation.lines.LinesScreenKt$LinesList$lambda$13$lambda$12$$inlined$items$default$3
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public /* bridge */ /* synthetic */ Object invoke(Integer num) {
|
||||
return invoke(num.intValue());
|
||||
}
|
||||
|
||||
public final Object invoke(int i) {
|
||||
return linesScreenKt$LinesList$lambda$13$lambda$12$$inlined$items$default$1.invoke(list.get(i));
|
||||
}
|
||||
}, ComposableLambdaKt.composableLambdaInstance(802480018, true, new Function4<LazyItemScope, Integer, Composer, Integer, Unit>() { // from class: com.sistemasolton.itranvias.home.presentation.lines.LinesScreenKt$LinesList$lambda$13$lambda$12$$inlined$items$default$4
|
||||
@Override // kotlin.jvm.functions.Function4
|
||||
public /* bridge */ /* synthetic */ Unit invoke(LazyItemScope lazyItemScope, Integer num, Composer composer, Integer num2) {
|
||||
invoke(lazyItemScope, num.intValue(), composer, num2.intValue());
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
public final void invoke(LazyItemScope lazyItemScope, int i, Composer composer, int i2) {
|
||||
int i3;
|
||||
ComposerKt.sourceInformation(composer, "CN(it)178@8834L22:LazyDsl.kt#428nma");
|
||||
if ((i2 & 6) == 0) {
|
||||
i3 = i2 | (composer.changed(lazyItemScope) ? 4 : 2);
|
||||
} else {
|
||||
i3 = i2;
|
||||
}
|
||||
if ((i2 & 48) == 0) {
|
||||
i3 |= composer.changed(i) ? 32 : 16;
|
||||
}
|
||||
if (!composer.shouldExecute((i3 & 147) != 146, i3 & 1)) {
|
||||
composer.skipToGroupEnd();
|
||||
return;
|
||||
}
|
||||
if (ComposerKt.isTraceInProgress()) {
|
||||
ComposerKt.traceEventStart(802480018, i3, -1, "androidx.compose.foundation.lazy.items.<anonymous> (LazyDsl.kt:178)");
|
||||
}
|
||||
final LineaDto lineaDto = (LineaDto) list.get(i);
|
||||
composer.startReplaceGroup(-403946828);
|
||||
long colorSafely = LinesScreenKt.parseColorSafely("#" + lineaDto.getColor());
|
||||
long jM4500copywmQWz5c$default = Color.m4500copywmQWz5c$default(colorSafely, 0.2f, 0.0f, 0.0f, 0.0f, 14, null);
|
||||
final String str = "Línea " + LinesScreenKt.formatLineNameForAccessibility(lineaDto.getLinComer()) + ", desde " + lineaDto.getNombreOrig() + " hasta " + lineaDto.getNombreDest() + ". Toca para ver más detalles.";
|
||||
Modifier.Companion companion = Modifier.INSTANCE;
|
||||
composer.startReplaceGroup(-1633490746);
|
||||
boolean zChanged = composer.changed(function1) | composer.changedInstance(lineaDto);
|
||||
Object objRememberedValue = composer.rememberedValue();
|
||||
if (zChanged || objRememberedValue == Composer.INSTANCE.getEmpty()) {
|
||||
final Function1 function12 = function1;
|
||||
objRememberedValue = (Function0) new Function0<Unit>() { // from class: com.sistemasolton.itranvias.home.presentation.lines.LinesScreenKt$LinesList$2$1$1$1$1
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public /* bridge */ /* synthetic */ Unit invoke() {
|
||||
invoke2();
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* JADX INFO: renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2() {
|
||||
function12.invoke(String.valueOf(lineaDto.getId()));
|
||||
}
|
||||
};
|
||||
composer.updateRememberedValue(objRememberedValue);
|
||||
}
|
||||
composer.endReplaceGroup();
|
||||
float f = 8;
|
||||
Modifier modifierM832padding3ABfNKs = PaddingKt.m832padding3ABfNKs(BackgroundKt.m256backgroundbw27NRU(PaddingKt.m834paddingVpY3zN4$default(SizeKt.fillMaxWidth$default(ClickableKt.m298clickableoSLSa3U$default(companion, false, null, null, null, (Function0) objRememberedValue, 15, null), 0.0f, 1, null), 0.0f, Dp.m7215constructorimpl(4), 1, null), jM4500copywmQWz5c$default, RoundedCornerShapeKt.m1197RoundedCornerShape0680j_4(Dp.m7215constructorimpl(f))), Dp.m7215constructorimpl(12));
|
||||
composer.startReplaceGroup(5004770);
|
||||
boolean zChanged2 = composer.changed(str);
|
||||
Object objRememberedValue2 = composer.rememberedValue();
|
||||
if (zChanged2 || objRememberedValue2 == Composer.INSTANCE.getEmpty()) {
|
||||
objRememberedValue2 = (Function1) new Function1<SemanticsPropertyReceiver, Unit>() { // from class: com.sistemasolton.itranvias.home.presentation.lines.LinesScreenKt$LinesList$2$1$1$2$1
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public /* bridge */ /* synthetic */ Unit invoke(SemanticsPropertyReceiver semanticsPropertyReceiver) {
|
||||
invoke2(semanticsPropertyReceiver);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* JADX INFO: renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2(SemanticsPropertyReceiver clearAndSetSemantics) {
|
||||
Intrinsics.checkNotNullParameter(clearAndSetSemantics, "$this$clearAndSetSemantics");
|
||||
SemanticsPropertiesKt.setContentDescription(clearAndSetSemantics, str);
|
||||
SemanticsPropertiesKt.m6444setRolekuIjeqM(clearAndSetSemantics, Role.INSTANCE.m6425getButtono7Vup1c());
|
||||
}
|
||||
};
|
||||
composer.updateRememberedValue(objRememberedValue2);
|
||||
}
|
||||
composer.endReplaceGroup();
|
||||
Modifier modifierClearAndSetSemantics = SemanticsModifierKt.clearAndSetSemantics(modifierM832padding3ABfNKs, (Function1) objRememberedValue2);
|
||||
Alignment.Vertical centerVertically = Alignment.INSTANCE.getCenterVertically();
|
||||
ComposerKt.sourceInformationMarkerStart(composer, 844473419, "CC(Row)N(modifier,horizontalArrangement,verticalAlignment,content)99@5125L58,100@5188L131:Row.kt#2w3rfo");
|
||||
MeasurePolicy measurePolicyRowMeasurePolicy = RowKt.rowMeasurePolicy(Arrangement.INSTANCE.getStart(), centerVertically, composer, 48);
|
||||
ComposerKt.sourceInformationMarkerStart(composer, -1159599143, "CC(Layout)P(!1,2)80@3267L27,83@3433L360:Layout.kt#80mrfh");
|
||||
int iHashCode = Long.hashCode(ComposablesKt.getCurrentCompositeKeyHashCode(composer, 0));
|
||||
CompositionLocalMap currentCompositionLocalMap = composer.getCurrentCompositionLocalMap();
|
||||
Modifier modifierMaterializeModifier = ComposedModifierKt.materializeModifier(composer, modifierClearAndSetSemantics);
|
||||
Function0<ComposeUiNode> constructor = ComposeUiNode.INSTANCE.getConstructor();
|
||||
ComposerKt.sourceInformationMarkerStart(composer, -553112988, "CC(ReusableComposeNode)N(factory,update,content)399@15590L9:Composables.kt#9igjgp");
|
||||
if (!(composer.getApplier() instanceof Applier)) {
|
||||
ComposablesKt.invalidApplier();
|
||||
}
|
||||
composer.startReusableNode();
|
||||
if (composer.getInserting()) {
|
||||
composer.createNode(constructor);
|
||||
} else {
|
||||
composer.useNode();
|
||||
}
|
||||
Composer composerM3820constructorimpl = Updater.m3820constructorimpl(composer);
|
||||
Updater.m3827setimpl(composerM3820constructorimpl, measurePolicyRowMeasurePolicy, ComposeUiNode.INSTANCE.getSetMeasurePolicy());
|
||||
Updater.m3827setimpl(composerM3820constructorimpl, currentCompositionLocalMap, ComposeUiNode.INSTANCE.getSetResolvedCompositionLocals());
|
||||
Function2<ComposeUiNode, Integer, Unit> setCompositeKeyHash = ComposeUiNode.INSTANCE.getSetCompositeKeyHash();
|
||||
if (composerM3820constructorimpl.getInserting() || !Intrinsics.areEqual(composerM3820constructorimpl.rememberedValue(), Integer.valueOf(iHashCode))) {
|
||||
composerM3820constructorimpl.updateRememberedValue(Integer.valueOf(iHashCode));
|
||||
composerM3820constructorimpl.apply(Integer.valueOf(iHashCode), setCompositeKeyHash);
|
||||
}
|
||||
Updater.m3827setimpl(composerM3820constructorimpl, modifierMaterializeModifier, ComposeUiNode.INSTANCE.getSetModifier());
|
||||
ComposerKt.sourceInformationMarkerStart(composer, 1456264949, "C101@5233L9:Row.kt#2w3rfo");
|
||||
RowScopeInstance rowScopeInstance = RowScopeInstance.INSTANCE;
|
||||
Modifier modifierM256backgroundbw27NRU = BackgroundKt.m256backgroundbw27NRU(SizeKt.m884size3ABfNKs(Modifier.INSTANCE, Dp.m7215constructorimpl(48)), colorSafely, RoundedCornerShapeKt.m1197RoundedCornerShape0680j_4(Dp.m7215constructorimpl(f)));
|
||||
Alignment center = Alignment.INSTANCE.getCenter();
|
||||
ComposerKt.sourceInformationMarkerStart(composer, 1042775818, "CC(Box)N(modifier,contentAlignment,propagateMinConstraints,content)71@3424L131:Box.kt#2w3rfo");
|
||||
MeasurePolicy measurePolicyMaybeCachedBoxMeasurePolicy = BoxKt.maybeCachedBoxMeasurePolicy(center, false);
|
||||
ComposerKt.sourceInformationMarkerStart(composer, -1159599143, "CC(Layout)P(!1,2)80@3267L27,83@3433L360:Layout.kt#80mrfh");
|
||||
int iHashCode2 = Long.hashCode(ComposablesKt.getCurrentCompositeKeyHashCode(composer, 0));
|
||||
CompositionLocalMap currentCompositionLocalMap2 = composer.getCurrentCompositionLocalMap();
|
||||
Modifier modifierMaterializeModifier2 = ComposedModifierKt.materializeModifier(composer, modifierM256backgroundbw27NRU);
|
||||
Function0<ComposeUiNode> constructor2 = ComposeUiNode.INSTANCE.getConstructor();
|
||||
ComposerKt.sourceInformationMarkerStart(composer, -553112988, "CC(ReusableComposeNode)N(factory,update,content)399@15590L9:Composables.kt#9igjgp");
|
||||
if (!(composer.getApplier() instanceof Applier)) {
|
||||
ComposablesKt.invalidApplier();
|
||||
}
|
||||
composer.startReusableNode();
|
||||
if (composer.getInserting()) {
|
||||
composer.createNode(constructor2);
|
||||
} else {
|
||||
composer.useNode();
|
||||
}
|
||||
Composer composerM3820constructorimpl2 = Updater.m3820constructorimpl(composer);
|
||||
Updater.m3827setimpl(composerM3820constructorimpl2, measurePolicyMaybeCachedBoxMeasurePolicy, ComposeUiNode.INSTANCE.getSetMeasurePolicy());
|
||||
Updater.m3827setimpl(composerM3820constructorimpl2, currentCompositionLocalMap2, ComposeUiNode.INSTANCE.getSetResolvedCompositionLocals());
|
||||
Function2<ComposeUiNode, Integer, Unit> setCompositeKeyHash2 = ComposeUiNode.INSTANCE.getSetCompositeKeyHash();
|
||||
if (composerM3820constructorimpl2.getInserting() || !Intrinsics.areEqual(composerM3820constructorimpl2.rememberedValue(), Integer.valueOf(iHashCode2))) {
|
||||
composerM3820constructorimpl2.updateRememberedValue(Integer.valueOf(iHashCode2));
|
||||
composerM3820constructorimpl2.apply(Integer.valueOf(iHashCode2), setCompositeKeyHash2);
|
||||
}
|
||||
Updater.m3827setimpl(composerM3820constructorimpl2, modifierMaterializeModifier2, ComposeUiNode.INSTANCE.getSetModifier());
|
||||
ComposerKt.sourceInformationMarkerStart(composer, 1833054614, "C72@3469L9:Box.kt#2w3rfo");
|
||||
BoxScopeInstance boxScopeInstance = BoxScopeInstance.INSTANCE;
|
||||
TextKt.m2803Text4IGK_g(lineaDto.getLinComer(), (Modifier) null, Color.INSTANCE.m4538getWhite0d7_KjU(), 0L, (FontStyle) null, (FontWeight) null, (FontFamily) null, 0L, (TextDecoration) null, (TextAlign) null, 0L, 0, false, 0, 0, (Function1<? super TextLayoutResult, Unit>) null, (TextStyle) null, composer, 384, 0, 131066);
|
||||
ComposerKt.sourceInformationMarkerEnd(composer);
|
||||
composer.endNode();
|
||||
ComposerKt.sourceInformationMarkerEnd(composer);
|
||||
ComposerKt.sourceInformationMarkerEnd(composer);
|
||||
ComposerKt.sourceInformationMarkerEnd(composer);
|
||||
SpacerKt.Spacer(SizeKt.m889width3ABfNKs(Modifier.INSTANCE, Dp.m7215constructorimpl(16)), composer, 6);
|
||||
Modifier modifierWeight$default = RowScope.weight$default(rowScopeInstance, Modifier.INSTANCE, 1.0f, false, 2, null);
|
||||
Alignment.Horizontal start = Alignment.INSTANCE.getStart();
|
||||
ComposerKt.sourceInformationMarkerStart(composer, 1341605231, "CC(Column)N(modifier,verticalArrangement,horizontalAlignment,content)87@4443L61,88@4509L134:Column.kt#2w3rfo");
|
||||
MeasurePolicy measurePolicyColumnMeasurePolicy = ColumnKt.columnMeasurePolicy(Arrangement.INSTANCE.getTop(), start, composer, 48);
|
||||
ComposerKt.sourceInformationMarkerStart(composer, -1159599143, "CC(Layout)P(!1,2)80@3267L27,83@3433L360:Layout.kt#80mrfh");
|
||||
int iHashCode3 = Long.hashCode(ComposablesKt.getCurrentCompositeKeyHashCode(composer, 0));
|
||||
CompositionLocalMap currentCompositionLocalMap3 = composer.getCurrentCompositionLocalMap();
|
||||
Modifier modifierMaterializeModifier3 = ComposedModifierKt.materializeModifier(composer, modifierWeight$default);
|
||||
Function0<ComposeUiNode> constructor3 = ComposeUiNode.INSTANCE.getConstructor();
|
||||
ComposerKt.sourceInformationMarkerStart(composer, -553112988, "CC(ReusableComposeNode)N(factory,update,content)399@15590L9:Composables.kt#9igjgp");
|
||||
if (!(composer.getApplier() instanceof Applier)) {
|
||||
ComposablesKt.invalidApplier();
|
||||
}
|
||||
composer.startReusableNode();
|
||||
if (composer.getInserting()) {
|
||||
composer.createNode(constructor3);
|
||||
} else {
|
||||
composer.useNode();
|
||||
}
|
||||
Composer composerM3820constructorimpl3 = Updater.m3820constructorimpl(composer);
|
||||
Updater.m3827setimpl(composerM3820constructorimpl3, measurePolicyColumnMeasurePolicy, ComposeUiNode.INSTANCE.getSetMeasurePolicy());
|
||||
Updater.m3827setimpl(composerM3820constructorimpl3, currentCompositionLocalMap3, ComposeUiNode.INSTANCE.getSetResolvedCompositionLocals());
|
||||
Function2<ComposeUiNode, Integer, Unit> setCompositeKeyHash3 = ComposeUiNode.INSTANCE.getSetCompositeKeyHash();
|
||||
if (composerM3820constructorimpl3.getInserting() || !Intrinsics.areEqual(composerM3820constructorimpl3.rememberedValue(), Integer.valueOf(iHashCode3))) {
|
||||
composerM3820constructorimpl3.updateRememberedValue(Integer.valueOf(iHashCode3));
|
||||
composerM3820constructorimpl3.apply(Integer.valueOf(iHashCode3), setCompositeKeyHash3);
|
||||
}
|
||||
Updater.m3827setimpl(composerM3820constructorimpl3, modifierMaterializeModifier3, ComposeUiNode.INSTANCE.getSetModifier());
|
||||
ComposerKt.sourceInformationMarkerStart(composer, 2093002350, "C89@4557L9:Column.kt#2w3rfo");
|
||||
ColumnScopeInstance columnScopeInstance = ColumnScopeInstance.INSTANCE;
|
||||
TextKt.m2803Text4IGK_g(lineaDto.getNombreOrig(), (Modifier) null, MaterialTheme.INSTANCE.getColorScheme(composer, MaterialTheme.$stable).getOnSurface(), 0L, (FontStyle) null, FontWeight.INSTANCE.getBold(), (FontFamily) null, 0L, (TextDecoration) null, (TextAlign) null, 0L, 0, false, 0, 0, (Function1<? super TextLayoutResult, Unit>) null, (TextStyle) null, composer, ProfileVerifier.CompilationStatus.RESULT_CODE_ERROR_CANT_WRITE_PROFILE_VERIFICATION_RESULT_CACHE_FILE, 0, 131034);
|
||||
TextKt.m2803Text4IGK_g(lineaDto.getNombreDest(), (Modifier) null, MaterialTheme.INSTANCE.getColorScheme(composer, MaterialTheme.$stable).getOnSurface(), 0L, (FontStyle) null, FontWeight.INSTANCE.getBold(), (FontFamily) null, 0L, (TextDecoration) null, (TextAlign) null, 0L, 0, false, 0, 0, (Function1<? super TextLayoutResult, Unit>) null, (TextStyle) null, composer, ProfileVerifier.CompilationStatus.RESULT_CODE_ERROR_CANT_WRITE_PROFILE_VERIFICATION_RESULT_CACHE_FILE, 0, 131034);
|
||||
ComposerKt.sourceInformationMarkerEnd(composer);
|
||||
composer.endNode();
|
||||
ComposerKt.sourceInformationMarkerEnd(composer);
|
||||
ComposerKt.sourceInformationMarkerEnd(composer);
|
||||
ComposerKt.sourceInformationMarkerEnd(composer);
|
||||
ComposerKt.sourceInformationMarkerEnd(composer);
|
||||
composer.endNode();
|
||||
ComposerKt.sourceInformationMarkerEnd(composer);
|
||||
ComposerKt.sourceInformationMarkerEnd(composer);
|
||||
ComposerKt.sourceInformationMarkerEnd(composer);
|
||||
composer.endReplaceGroup();
|
||||
if (ComposerKt.isTraceInProgress()) {
|
||||
ComposerKt.traceEventEnd();
|
||||
}
|
||||
}
|
||||
}));
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.sistemasolton.itranvias.home.presentation.lines;
|
||||
|
||||
import com.sistemasolton.itranvias.home.data.remote.dto.infodto.InfoDto;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* JADX INFO: compiled from: LinesState.kt */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u000f\n\u0002\u0010\b\n\u0002\b\u0002\b\u0087\b\u0018\u00002\u00020\u0001B3\u0012\b\b\u0002\u0010\u0002\u001a\u00020\u0003\u0012\b\b\u0002\u0010\u0004\u001a\u00020\u0003\u0012\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u0006\u0012\n\b\u0002\u0010\u0007\u001a\u0004\u0018\u00010\b¢\u0006\u0004\b\t\u0010\nJ\t\u0010\u0010\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0011\u001a\u00020\u0003HÆ\u0003J\u000b\u0010\u0012\u001a\u0004\u0018\u00010\u0006HÆ\u0003J\u000b\u0010\u0013\u001a\u0004\u0018\u00010\bHÆ\u0003J5\u0010\u0014\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00032\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u00062\n\b\u0002\u0010\u0007\u001a\u0004\u0018\u00010\bHÆ\u0001J\u0013\u0010\u0015\u001a\u00020\u00032\b\u0010\u0016\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0017\u001a\u00020\u0018HÖ\u0001J\t\u0010\u0019\u001a\u00020\bHÖ\u0001R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0002\u0010\u000bR\u0011\u0010\u0004\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0004\u0010\u000bR\u0013\u0010\u0005\u001a\u0004\u0018\u00010\u0006¢\u0006\b\n\u0000\u001a\u0004\b\f\u0010\rR\u0013\u0010\u0007\u001a\u0004\u0018\u00010\b¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u000f¨\u0006\u001a"}, d2 = {"Lcom/sistemasolton/itranvias/home/presentation/lines/LinesState;", "", "isLoading", "", "isError", "infoDto", "Lcom/sistemasolton/itranvias/home/data/remote/dto/infodto/InfoDto;", "errorMessage", "", "<init>", "(ZZLcom/sistemasolton/itranvias/home/data/remote/dto/infodto/InfoDto;Ljava/lang/String;)V", "()Z", "getInfoDto", "()Lcom/sistemasolton/itranvias/home/data/remote/dto/infodto/InfoDto;", "getErrorMessage", "()Ljava/lang/String;", "component1", "component2", "component3", "component4", "copy", "equals", "other", "hashCode", "", "toString", "composeApp_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
|
||||
public final /* data */ class LinesState {
|
||||
public static final int $stable = 8;
|
||||
private final String errorMessage;
|
||||
private final InfoDto infoDto;
|
||||
private final boolean isError;
|
||||
private final boolean isLoading;
|
||||
|
||||
public LinesState() {
|
||||
this(false, false, null, null, 15, null);
|
||||
}
|
||||
|
||||
public static /* synthetic */ LinesState copy$default(LinesState linesState, boolean z, boolean z2, InfoDto infoDto, String str, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
z = linesState.isLoading;
|
||||
}
|
||||
if ((i & 2) != 0) {
|
||||
z2 = linesState.isError;
|
||||
}
|
||||
if ((i & 4) != 0) {
|
||||
infoDto = linesState.infoDto;
|
||||
}
|
||||
if ((i & 8) != 0) {
|
||||
str = linesState.errorMessage;
|
||||
}
|
||||
return linesState.copy(z, z2, infoDto, str);
|
||||
}
|
||||
|
||||
/* JADX INFO: renamed from: component1, reason: from getter */
|
||||
public final boolean getIsLoading() {
|
||||
return this.isLoading;
|
||||
}
|
||||
|
||||
/* JADX INFO: renamed from: component2, reason: from getter */
|
||||
public final boolean getIsError() {
|
||||
return this.isError;
|
||||
}
|
||||
|
||||
/* JADX INFO: renamed from: component3, reason: from getter */
|
||||
public final InfoDto getInfoDto() {
|
||||
return this.infoDto;
|
||||
}
|
||||
|
||||
/* JADX INFO: renamed from: component4, reason: from getter */
|
||||
public final String getErrorMessage() {
|
||||
return this.errorMessage;
|
||||
}
|
||||
|
||||
public final LinesState copy(boolean isLoading, boolean isError, InfoDto infoDto, String errorMessage) {
|
||||
return new LinesState(isLoading, isError, infoDto, errorMessage);
|
||||
}
|
||||
|
||||
public boolean equals(Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof LinesState)) {
|
||||
return false;
|
||||
}
|
||||
LinesState linesState = (LinesState) other;
|
||||
return this.isLoading == linesState.isLoading && this.isError == linesState.isError && Intrinsics.areEqual(this.infoDto, linesState.infoDto) && Intrinsics.areEqual(this.errorMessage, linesState.errorMessage);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int iHashCode = ((Boolean.hashCode(this.isLoading) * 31) + Boolean.hashCode(this.isError)) * 31;
|
||||
InfoDto infoDto = this.infoDto;
|
||||
int iHashCode2 = (iHashCode + (infoDto == null ? 0 : infoDto.hashCode())) * 31;
|
||||
String str = this.errorMessage;
|
||||
return iHashCode2 + (str != null ? str.hashCode() : 0);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "LinesState(isLoading=" + this.isLoading + ", isError=" + this.isError + ", infoDto=" + this.infoDto + ", errorMessage=" + this.errorMessage + ")";
|
||||
}
|
||||
|
||||
public LinesState(boolean z, boolean z2, InfoDto infoDto, String str) {
|
||||
this.isLoading = z;
|
||||
this.isError = z2;
|
||||
this.infoDto = infoDto;
|
||||
this.errorMessage = str;
|
||||
}
|
||||
|
||||
public /* synthetic */ LinesState(boolean z, boolean z2, InfoDto infoDto, String str, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this((i & 1) != 0 ? false : z, (i & 2) != 0 ? false : z2, (i & 4) != 0 ? null : infoDto, (i & 8) != 0 ? null : str);
|
||||
}
|
||||
|
||||
public final boolean isLoading() {
|
||||
return this.isLoading;
|
||||
}
|
||||
|
||||
public final boolean isError() {
|
||||
return this.isError;
|
||||
}
|
||||
|
||||
public final InfoDto getInfoDto() {
|
||||
return this.infoDto;
|
||||
}
|
||||
|
||||
public final String getErrorMessage() {
|
||||
return this.errorMessage;
|
||||
}
|
||||
}
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
package com.sistemasolton.itranvias.home.presentation.lines;
|
||||
|
||||
import androidx.compose.runtime.MutableState;
|
||||
import androidx.compose.runtime.SnapshotStateKt__SnapshotStateKt;
|
||||
import androidx.core.view.MotionEventCompat;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
import androidx.lifecycle.ViewModelKt;
|
||||
import com.sistemasolton.itranvias.home.data.remote.dto.infodto.InfoDto;
|
||||
import com.sistemasolton.itranvias.home.domain.usecase.GetInfoLocalUseCase;
|
||||
import com.sistemasolton.itranvias.home.domain.usecase.GetInfoUseCase;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
import kotlinx.coroutines.flow.FlowKt;
|
||||
|
||||
/* JADX INFO: compiled from: LinesViewModel.kt */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\b\u0007\u0018\u00002\u00020\u0001B\u0017\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0004\b\u0006\u0010\u0007J\u0006\u0010\u0013\u001a\u00020\u0014R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000R+\u0010\n\u001a\u00020\t2\u0006\u0010\b\u001a\u00020\t8F@BX\u0086\u008e\u0002¢\u0006\u0012\n\u0004\b\u000f\u0010\u0010\u001a\u0004\b\u000b\u0010\f\"\u0004\b\r\u0010\u000eR\u0010\u0010\u0011\u001a\u0004\u0018\u00010\u0012X\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\u0015"}, d2 = {"Lcom/sistemasolton/itranvias/home/presentation/lines/LinesViewModel;", "Landroidx/lifecycle/ViewModel;", "getInfoUseCase", "Lcom/sistemasolton/itranvias/home/domain/usecase/GetInfoUseCase;", "getLocalInfoUseCase", "Lcom/sistemasolton/itranvias/home/domain/usecase/GetInfoLocalUseCase;", "<init>", "(Lcom/sistemasolton/itranvias/home/domain/usecase/GetInfoUseCase;Lcom/sistemasolton/itranvias/home/domain/usecase/GetInfoLocalUseCase;)V", "<set-?>", "Lcom/sistemasolton/itranvias/home/presentation/lines/LinesState;", "state", "getState", "()Lcom/sistemasolton/itranvias/home/presentation/lines/LinesState;", "setState", "(Lcom/sistemasolton/itranvias/home/presentation/lines/LinesState;)V", "state$delegate", "Landroidx/compose/runtime/MutableState;", "lastLanguage", "", "loadLocalInfo", "", "composeApp_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
|
||||
public final class LinesViewModel extends ViewModel {
|
||||
public static final int $stable = 8;
|
||||
private final GetInfoUseCase getInfoUseCase;
|
||||
private final GetInfoLocalUseCase getLocalInfoUseCase;
|
||||
private String lastLanguage;
|
||||
|
||||
/* JADX INFO: renamed from: state$delegate, reason: from kotlin metadata */
|
||||
private final MutableState state;
|
||||
|
||||
public LinesViewModel(GetInfoUseCase getInfoUseCase, GetInfoLocalUseCase getLocalInfoUseCase) {
|
||||
Intrinsics.checkNotNullParameter(getInfoUseCase, "getInfoUseCase");
|
||||
Intrinsics.checkNotNullParameter(getLocalInfoUseCase, "getLocalInfoUseCase");
|
||||
this.getInfoUseCase = getInfoUseCase;
|
||||
this.getLocalInfoUseCase = getLocalInfoUseCase;
|
||||
this.state = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(new LinesState(false, false, null, null, 15, null), null, 2, null);
|
||||
loadLocalInfo();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void setState(LinesState linesState) {
|
||||
this.state.setValue(linesState);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public final LinesState getState() {
|
||||
return (LinesState) this.state.getValue();
|
||||
}
|
||||
|
||||
/* JADX INFO: renamed from: com.sistemasolton.itranvias.home.presentation.lines.LinesViewModel$loadLocalInfo$1, reason: invalid class name */
|
||||
/* JADX INFO: compiled from: LinesViewModel.kt */
|
||||
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\n"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {2, 1, 0}, xi = 48)
|
||||
@DebugMetadata(c = "com.sistemasolton.itranvias.home.presentation.lines.LinesViewModel$loadLocalInfo$1", f = "LinesViewModel.kt", i = {}, l = {MotionEventCompat.AXIS_GENERIC_4}, m = "invokeSuspend", n = {}, s = {})
|
||||
static final class AnonymousClass1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
|
||||
int label;
|
||||
|
||||
AnonymousClass1(Continuation<? super AnonymousClass1> continuation) {
|
||||
super(2, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
return LinesViewModel.this.new AnonymousClass1(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
|
||||
return ((AnonymousClass1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) throws Throwable {
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.label;
|
||||
if (i == 0) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
LinesViewModel linesViewModel = LinesViewModel.this;
|
||||
linesViewModel.setState(LinesState.copy$default(linesViewModel.getState(), true, false, null, null, 12, null));
|
||||
this.label = 1;
|
||||
if (FlowKt.collectLatest(LinesViewModel.this.getLocalInfoUseCase.invoke(), new C01181(LinesViewModel.this, null), this) == coroutine_suspended) {
|
||||
return coroutine_suspended;
|
||||
}
|
||||
} else {
|
||||
if (i != 1) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
}
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* JADX INFO: renamed from: com.sistemasolton.itranvias.home.presentation.lines.LinesViewModel$loadLocalInfo$1$1, reason: invalid class name and collision with other inner class name */
|
||||
/* JADX INFO: compiled from: LinesViewModel.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u00012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003H\n"}, d2 = {"<anonymous>", "", "localInfo", "Lcom/sistemasolton/itranvias/home/data/remote/dto/infodto/InfoDto;"}, k = 3, mv = {2, 1, 0}, xi = 48)
|
||||
@DebugMetadata(c = "com.sistemasolton.itranvias.home.presentation.lines.LinesViewModel$loadLocalInfo$1$1", f = "LinesViewModel.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
|
||||
static final class C01181 extends SuspendLambda implements Function2<InfoDto, Continuation<? super Unit>, Object> {
|
||||
/* synthetic */ Object L$0;
|
||||
int label;
|
||||
final /* synthetic */ LinesViewModel this$0;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
C01181(LinesViewModel linesViewModel, Continuation<? super C01181> continuation) {
|
||||
super(2, continuation);
|
||||
this.this$0 = linesViewModel;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
C01181 c01181 = new C01181(this.this$0, continuation);
|
||||
c01181.L$0 = obj;
|
||||
return c01181;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(InfoDto infoDto, Continuation<? super Unit> continuation) {
|
||||
return ((C01181) create(infoDto, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) throws Throwable {
|
||||
IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
if (this.label != 0) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
InfoDto infoDto = (InfoDto) this.L$0;
|
||||
LinesViewModel linesViewModel = this.this$0;
|
||||
linesViewModel.setState(linesViewModel.getState().copy(false, false, infoDto, null));
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final void loadLocalInfo() {
|
||||
BuildersKt__Builders_commonKt.launch$default(ViewModelKt.getViewModelScope(this), null, null, new AnonymousClass1(null), 3, null);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user