Initial version -- added millennium read funcionality
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package com.sistemasolton.itranvias.data.preferences;
|
||||
|
||||
import kotlin.Metadata;
|
||||
|
||||
/* JADX INFO: compiled from: createDataStore.kt */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u000e\n\u0000\"\u000e\u0010\u0000\u001a\u00020\u0001X\u0080T¢\u0006\u0002\n\u0000¨\u0006\u0002"}, d2 = {"DATASTORE_FILE_NAME", "", "composeApp_release"}, k = 2, mv = {2, 1, 0}, xi = 48)
|
||||
public final class CreateDataStoreKt {
|
||||
public static final String DATASTORE_FILE_NAME = "itranvias_preferences.preferences_pb";
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.sistemasolton.itranvias.data.preferences;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.datastore.core.DataStore;
|
||||
import androidx.datastore.preferences.PreferenceDataStoreDelegateKt;
|
||||
import androidx.datastore.preferences.core.Preferences;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.PropertyReference1Impl;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import kotlin.properties.ReadOnlyProperty;
|
||||
import kotlin.reflect.KProperty;
|
||||
|
||||
/* JADX INFO: compiled from: createDataStore.android.kt */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
@Metadata(d1 = {"\u0000 \n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\u0002\n\u0002\b\u0003\u001a\u000e\u0010\u000b\u001a\u00020\f2\u0006\u0010\r\u001a\u00020\u0005\u001a\f\u0010\u000e\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003\"\u000e\u0010\u0000\u001a\u00020\u0001X\u0082T¢\u0006\u0002\n\u0000\"%\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003*\u00020\u00058BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\b\u0010\t\u001a\u0004\b\u0006\u0010\u0007\"\u000e\u0010\n\u001a\u00020\u0005X\u0082.¢\u0006\u0002\n\u0000¨\u0006\u000f"}, d2 = {"DATASTORE_FILE_NAME", "", "dataStore", "Landroidx/datastore/core/DataStore;", "Landroidx/datastore/preferences/core/Preferences;", "Landroid/content/Context;", "getDataStore", "(Landroid/content/Context;)Landroidx/datastore/core/DataStore;", "dataStore$delegate", "Lkotlin/properties/ReadOnlyProperty;", "applicationContext", "initDataStore", "", "context", "createDataStore", "composeApp_release"}, k = 2, mv = {2, 1, 0}, xi = 48)
|
||||
public final class CreateDataStore_androidKt {
|
||||
private static Context applicationContext;
|
||||
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(CreateDataStore_androidKt.class, "dataStore", "getDataStore(Landroid/content/Context;)Landroidx/datastore/core/DataStore;", 1))};
|
||||
private static final String DATASTORE_FILE_NAME = "itranvias_preferences";
|
||||
private static final ReadOnlyProperty dataStore$delegate = PreferenceDataStoreDelegateKt.preferencesDataStore$default(DATASTORE_FILE_NAME, null, null, null, 14, null);
|
||||
|
||||
private static final DataStore<Preferences> getDataStore(Context context) {
|
||||
return (DataStore) dataStore$delegate.getValue(context, $$delegatedProperties[0]);
|
||||
}
|
||||
|
||||
public static final void initDataStore(Context context) {
|
||||
Intrinsics.checkNotNullParameter(context, "context");
|
||||
if (applicationContext == null) {
|
||||
applicationContext = context.getApplicationContext();
|
||||
}
|
||||
}
|
||||
|
||||
public static final DataStore<Preferences> createDataStore() {
|
||||
Context context = applicationContext;
|
||||
if (context == null) {
|
||||
throw new IllegalStateException("DataStore not initialized. Call initDataStore(context) from MainActivity.onCreate()");
|
||||
}
|
||||
if (context == null) {
|
||||
Intrinsics.throwUninitializedPropertyAccessException("applicationContext");
|
||||
context = null;
|
||||
}
|
||||
return getDataStore(context);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.sistemasolton.itranvias.data.preferences;
|
||||
|
||||
import androidx.datastore.core.DataStore;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import org.koin.core.definition.BeanDefinition;
|
||||
import org.koin.core.definition.Kind;
|
||||
import org.koin.core.definition.KoinDefinition;
|
||||
import org.koin.core.instance.SingleInstanceFactory;
|
||||
import org.koin.core.module.Module;
|
||||
import org.koin.core.parameter.ParametersHolder;
|
||||
import org.koin.core.registry.ScopeRegistry;
|
||||
import org.koin.core.scope.Scope;
|
||||
import org.koin.dsl.ModuleDSLKt;
|
||||
|
||||
/* JADX INFO: compiled from: DataStoreModule.kt */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\"\u0011\u0010\u0000\u001a\u00020\u0001¢\u0006\b\n\u0000\u001a\u0004\b\u0002\u0010\u0003¨\u0006\u0004"}, d2 = {"dataStoreModule", "Lorg/koin/core/module/Module;", "getDataStoreModule", "()Lorg/koin/core/module/Module;", "composeApp_release"}, k = 2, mv = {2, 1, 0}, xi = 48)
|
||||
public final class DataStoreModuleKt {
|
||||
private static final Module dataStoreModule = ModuleDSLKt.module$default(false, new Function1() { // from class: com.sistemasolton.itranvias.data.preferences.DataStoreModuleKt$$ExternalSyntheticLambda0
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Object invoke(Object obj) {
|
||||
return DataStoreModuleKt.dataStoreModule$lambda$2((Module) obj);
|
||||
}
|
||||
}, 1, null);
|
||||
|
||||
public static final Module getDataStoreModule() {
|
||||
return dataStoreModule;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final DataStore dataStoreModule$lambda$2$lambda$0(Scope single, ParametersHolder it) {
|
||||
Intrinsics.checkNotNullParameter(single, "$this$single");
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
return CreateDataStore_androidKt.createDataStore();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final SettingsRepository dataStoreModule$lambda$2$lambda$1(Scope single, ParametersHolder it) {
|
||||
Intrinsics.checkNotNullParameter(single, "$this$single");
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
return new SettingsRepository((DataStore) single.get(Reflection.getOrCreateKotlinClass(DataStore.class), null, null));
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final Unit dataStoreModule$lambda$2(Module module) {
|
||||
Intrinsics.checkNotNullParameter(module, "$this$module");
|
||||
Function2 function2 = new Function2() { // from class: com.sistemasolton.itranvias.data.preferences.DataStoreModuleKt$$ExternalSyntheticLambda1
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return DataStoreModuleKt.dataStoreModule$lambda$2$lambda$0((Scope) obj, (ParametersHolder) obj2);
|
||||
}
|
||||
};
|
||||
SingleInstanceFactory<?> singleInstanceFactory = new SingleInstanceFactory<>(new BeanDefinition(ScopeRegistry.INSTANCE.getRootScopeQualifier(), Reflection.getOrCreateKotlinClass(DataStore.class), null, function2, Kind.Singleton, CollectionsKt.emptyList()));
|
||||
SingleInstanceFactory<?> singleInstanceFactory2 = singleInstanceFactory;
|
||||
module.indexPrimaryType(singleInstanceFactory2);
|
||||
if (module.get_createdAtStart()) {
|
||||
module.prepareForCreationAtStart(singleInstanceFactory);
|
||||
}
|
||||
new KoinDefinition(module, singleInstanceFactory2);
|
||||
Function2 function22 = new Function2() { // from class: com.sistemasolton.itranvias.data.preferences.DataStoreModuleKt$$ExternalSyntheticLambda2
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return DataStoreModuleKt.dataStoreModule$lambda$2$lambda$1((Scope) obj, (ParametersHolder) obj2);
|
||||
}
|
||||
};
|
||||
SingleInstanceFactory<?> singleInstanceFactory3 = new SingleInstanceFactory<>(new BeanDefinition(ScopeRegistry.INSTANCE.getRootScopeQualifier(), Reflection.getOrCreateKotlinClass(SettingsRepository.class), null, function22, Kind.Singleton, CollectionsKt.emptyList()));
|
||||
SingleInstanceFactory<?> singleInstanceFactory4 = singleInstanceFactory3;
|
||||
module.indexPrimaryType(singleInstanceFactory4);
|
||||
if (module.get_createdAtStart()) {
|
||||
module.prepareForCreationAtStart(singleInstanceFactory3);
|
||||
}
|
||||
new KoinDefinition(module, singleInstanceFactory4);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
}
|
||||
+144
@@ -0,0 +1,144 @@
|
||||
package com.sistemasolton.itranvias.data.preferences;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* JADX INFO: compiled from: OldSettingsMigration.android.kt */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0002\b\u0007\u0018\u0000 \u000f2\u00020\u0001:\u0001\u000fB\u000f\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0004\b\u0004\u0010\u0005J\b\u0010\t\u001a\u0004\u0018\u00010\nJ\b\u0010\u000b\u001a\u0004\u0018\u00010\nJ\b\u0010\f\u001a\u0004\u0018\u00010\nJ\u0006\u0010\r\u001a\u00020\u000eR\u0014\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\b0\u0007X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0010"}, d2 = {"Lcom/sistemasolton/itranvias/data/preferences/OldSettingsMigration;", "", "context", "Landroid/content/Context;", "<init>", "(Landroid/content/Context;)V", "possiblePreferences", "", "Landroid/content/SharedPreferences;", "getOldLanguage", "", "getOldTheme", "getOldPreferredTab", "hasOldSettings", "", "Companion", "composeApp_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
|
||||
public final class OldSettingsMigration {
|
||||
|
||||
@Deprecated
|
||||
public static final String TAG = "OldSettingsMigration";
|
||||
private final List<SharedPreferences> possiblePreferences;
|
||||
private static final Companion Companion = new Companion(null);
|
||||
public static final int $stable = 8;
|
||||
|
||||
public OldSettingsMigration(Context context) {
|
||||
Intrinsics.checkNotNullParameter(context, "context");
|
||||
this.possiblePreferences = CollectionsKt.listOf((Object[]) new SharedPreferences[]{PreferenceManager.getDefaultSharedPreferences(context), context.getSharedPreferences("com.russhwolf.settings.Settings", 0), context.getSharedPreferences(context.getPackageName(), 0), context.getSharedPreferences("app_preferences", 0)});
|
||||
}
|
||||
|
||||
/* JADX INFO: compiled from: OldSettingsMigration.android.kt */
|
||||
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0000\b\u0082\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003R\u000e\u0010\u0004\u001a\u00020\u0005X\u0086T¢\u0006\u0002\n\u0000¨\u0006\u0006"}, d2 = {"Lcom/sistemasolton/itranvias/data/preferences/OldSettingsMigration$Companion;", "", "<init>", "()V", "TAG", "", "composeApp_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
|
||||
private static final class Companion {
|
||||
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
}
|
||||
|
||||
public final String getOldLanguage() {
|
||||
String str;
|
||||
Log.d(TAG, "🔍 Buscando 'app_language' en SharedPreferences...");
|
||||
Iterator<T> it = this.possiblePreferences.iterator();
|
||||
int i = 0;
|
||||
while (it.hasNext()) {
|
||||
int i2 = i + 1;
|
||||
String string = ((SharedPreferences) it.next()).getString("app_language", null);
|
||||
if (string != null) {
|
||||
if (i == 0) {
|
||||
str = "Default SharedPreferences";
|
||||
} else if (i == 1) {
|
||||
str = "com.russhwolf.settings.Settings";
|
||||
} else if (i == 2) {
|
||||
str = "Nombre del paquete";
|
||||
} else if (i == 3) {
|
||||
str = "app_preferences";
|
||||
} else {
|
||||
str = "Ubicación desconocida";
|
||||
}
|
||||
Log.i(TAG, "✅ 'app_language' encontrado en: " + str + " = '" + string + "'");
|
||||
return string;
|
||||
}
|
||||
i = i2;
|
||||
}
|
||||
Log.w(TAG, "⚠️ 'app_language' NO encontrado en ninguna ubicación");
|
||||
return null;
|
||||
}
|
||||
|
||||
public final String getOldTheme() {
|
||||
String str;
|
||||
Log.d(TAG, "🔍 Buscando 'app_theme' en SharedPreferences...");
|
||||
Iterator<T> it = this.possiblePreferences.iterator();
|
||||
int i = 0;
|
||||
while (it.hasNext()) {
|
||||
int i2 = i + 1;
|
||||
String string = ((SharedPreferences) it.next()).getString("app_theme", null);
|
||||
if (string != null) {
|
||||
if (i == 0) {
|
||||
str = "Default SharedPreferences";
|
||||
} else if (i == 1) {
|
||||
str = "com.russhwolf.settings.Settings";
|
||||
} else if (i == 2) {
|
||||
str = "Nombre del paquete";
|
||||
} else if (i == 3) {
|
||||
str = "app_preferences";
|
||||
} else {
|
||||
str = "Ubicación desconocida";
|
||||
}
|
||||
Log.i(TAG, "✅ 'app_theme' encontrado en: " + str + " = '" + string + "'");
|
||||
return string;
|
||||
}
|
||||
i = i2;
|
||||
}
|
||||
Log.w(TAG, "⚠️ 'app_theme' NO encontrado en ninguna ubicación");
|
||||
return null;
|
||||
}
|
||||
|
||||
public final String getOldPreferredTab() {
|
||||
String str;
|
||||
Log.d(TAG, "🔍 Buscando 'preferred_tab' en SharedPreferences...");
|
||||
Iterator<T> it = this.possiblePreferences.iterator();
|
||||
int i = 0;
|
||||
while (it.hasNext()) {
|
||||
int i2 = i + 1;
|
||||
String string = ((SharedPreferences) it.next()).getString("preferred_tab", null);
|
||||
if (string != null) {
|
||||
if (i == 0) {
|
||||
str = "Default SharedPreferences";
|
||||
} else if (i == 1) {
|
||||
str = "com.russhwolf.settings.Settings";
|
||||
} else if (i == 2) {
|
||||
str = "Nombre del paquete";
|
||||
} else if (i == 3) {
|
||||
str = "app_preferences";
|
||||
} else {
|
||||
str = "Ubicación desconocida";
|
||||
}
|
||||
Log.i(TAG, "✅ 'preferred_tab' encontrado en: " + str + " = '" + string + "'");
|
||||
return string;
|
||||
}
|
||||
i = i2;
|
||||
}
|
||||
Log.w(TAG, "⚠️ 'preferred_tab' NO encontrado en ninguna ubicación");
|
||||
return null;
|
||||
}
|
||||
|
||||
public final boolean hasOldSettings() {
|
||||
Log.d(TAG, "🔍 Verificando si hay datos antiguos para migrar...");
|
||||
boolean z = true;
|
||||
boolean z2 = getOldLanguage() != null;
|
||||
boolean z3 = getOldTheme() != null;
|
||||
boolean z4 = getOldPreferredTab() != null;
|
||||
if (!z2 && !z3 && !z4) {
|
||||
z = false;
|
||||
}
|
||||
if (z) {
|
||||
Log.i(TAG, "✅ Datos antiguos encontrados (Language: " + z2 + ", Theme: " + z3 + ", Tab: " + z4 + ")");
|
||||
} else {
|
||||
Log.i(TAG, "ℹ️ No se encontraron datos antiguos para migrar");
|
||||
}
|
||||
return z;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,771 @@
|
||||
package com.sistemasolton.itranvias.data.preferences;
|
||||
|
||||
import androidx.datastore.core.DataStore;
|
||||
import androidx.datastore.preferences.core.MutablePreferences;
|
||||
import androidx.datastore.preferences.core.Preferences;
|
||||
import androidx.datastore.preferences.core.PreferencesKeys;
|
||||
import androidx.datastore.preferences.core.PreferencesKt;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
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.flow.Flow;
|
||||
import kotlinx.coroutines.flow.FlowCollector;
|
||||
|
||||
/* JADX INFO: compiled from: SettingsRepository.kt */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
@Metadata(d1 = {"\u00002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\b\r\n\u0002\u0010\u000b\n\u0002\b\u0007\b\u0007\u0018\u0000 !2\u00020\u0001:\u0001!B\u0015\u0012\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003¢\u0006\u0004\b\u0005\u0010\u0006J\u0016\u0010\f\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\tH\u0086@¢\u0006\u0002\u0010\u000fJ\u0016\u0010\u0012\u001a\u00020\r2\u0006\u0010\u0013\u001a\u00020\tH\u0086@¢\u0006\u0002\u0010\u000fJ\u0016\u0010\u0016\u001a\u00020\r2\u0006\u0010\u0017\u001a\u00020\tH\u0086@¢\u0006\u0002\u0010\u000fJ\u000e\u0010\u0018\u001a\u00020\rH\u0086@¢\u0006\u0002\u0010\u0019J\u000e\u0010\u001a\u001a\u00020\u001bH\u0086@¢\u0006\u0002\u0010\u0019J,\u0010\u001c\u001a\u00020\r2\b\u0010\u001d\u001a\u0004\u0018\u00010\t2\b\u0010\u001e\u001a\u0004\u0018\u00010\t2\b\u0010\u001f\u001a\u0004\u0018\u00010\tH\u0086@¢\u0006\u0002\u0010 R\u0014\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0017\u0010\u0007\u001a\b\u0012\u0004\u0012\u00020\t0\b¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\u000bR\u0017\u0010\u0010\u001a\b\u0012\u0004\u0012\u00020\t0\b¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\u000bR\u0017\u0010\u0014\u001a\b\u0012\u0004\u0012\u00020\t0\b¢\u0006\b\n\u0000\u001a\u0004\b\u0015\u0010\u000b¨\u0006\""}, d2 = {"Lcom/sistemasolton/itranvias/data/preferences/SettingsRepository;", "", "dataStore", "Landroidx/datastore/core/DataStore;", "Landroidx/datastore/preferences/core/Preferences;", "<init>", "(Landroidx/datastore/core/DataStore;)V", "languageFlow", "Lkotlinx/coroutines/flow/Flow;", "", "getLanguageFlow", "()Lkotlinx/coroutines/flow/Flow;", "setLanguage", "", "language", "(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "themeFlow", "getThemeFlow", "setTheme", "theme", "preferredTabFlow", "getPreferredTabFlow", "setPreferredTab", "tabRoute", "clearPreferredTab", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "isMigrationCompleted", "", "migrateFromOldSettings", "oldLanguage", "oldTheme", "oldPreferredTab", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "Companion", "composeApp_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
|
||||
public final class SettingsRepository {
|
||||
private final DataStore<Preferences> dataStore;
|
||||
private final Flow<String> languageFlow;
|
||||
private final Flow<String> preferredTabFlow;
|
||||
private final Flow<String> themeFlow;
|
||||
public static final int $stable = 8;
|
||||
private static final Preferences.Key<String> KEY_LANGUAGE = PreferencesKeys.stringKey("app_language");
|
||||
private static final Preferences.Key<String> KEY_THEME = PreferencesKeys.stringKey("app_theme");
|
||||
private static final Preferences.Key<String> KEY_PREFERRED_TAB = PreferencesKeys.stringKey("preferred_tab");
|
||||
private static final Preferences.Key<String> KEY_MIGRATION_COMPLETED = PreferencesKeys.stringKey("migration_from_old_settings_completed");
|
||||
|
||||
/* JADX INFO: renamed from: com.sistemasolton.itranvias.data.preferences.SettingsRepository$isMigrationCompleted$1, reason: invalid class name */
|
||||
/* JADX INFO: compiled from: SettingsRepository.kt */
|
||||
@Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
|
||||
@DebugMetadata(c = "com.sistemasolton.itranvias.data.preferences.SettingsRepository", f = "SettingsRepository.kt", i = {}, l = {107}, m = "isMigrationCompleted", n = {}, s = {})
|
||||
static final class AnonymousClass1 extends ContinuationImpl {
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
AnonymousClass1(Continuation<? super AnonymousClass1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
return SettingsRepository.this.isMigrationCompleted(this);
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: renamed from: com.sistemasolton.itranvias.data.preferences.SettingsRepository$migrateFromOldSettings$1, reason: invalid class name and case insensitive filesystem */
|
||||
/* JADX INFO: compiled from: SettingsRepository.kt */
|
||||
@Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
|
||||
@DebugMetadata(c = "com.sistemasolton.itranvias.data.preferences.SettingsRepository", f = "SettingsRepository.kt", i = {0, 0, 0}, l = {125, 129}, m = "migrateFromOldSettings", n = {"oldLanguage", "oldTheme", "oldPreferredTab"}, s = {"L$0", "L$1", "L$2"})
|
||||
static final class C06251 extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
C06251(Continuation<? super C06251> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
return SettingsRepository.this.migrateFromOldSettings(null, null, null, this);
|
||||
}
|
||||
}
|
||||
|
||||
public SettingsRepository(DataStore<Preferences> dataStore) {
|
||||
Intrinsics.checkNotNullParameter(dataStore, "dataStore");
|
||||
this.dataStore = dataStore;
|
||||
final Flow<Preferences> data = dataStore.getData();
|
||||
this.languageFlow = new Flow<String>() { // from class: com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$1
|
||||
|
||||
/* JADX INFO: renamed from: com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$1$2, reason: invalid class name */
|
||||
/* JADX INFO: compiled from: Emitters.kt */
|
||||
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0007\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002\"\u0004\b\u0001\u0010\u00032\u0006\u0010\u0004\u001a\u0002H\u0002H\u008a@¢\u0006\u0004\b\u0005\u0010\u0006¨\u0006\b"}, d2 = {"<anonymous>", "", "T", "R", "value", "emit", "(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "kotlinx/coroutines/flow/FlowKt__EmittersKt$unsafeTransform$1$1", "kotlinx/coroutines/flow/FlowKt__TransformKt$map$$inlined$unsafeTransform$1$2"}, k = 3, mv = {2, 1, 0}, xi = 48)
|
||||
public static final class AnonymousClass2<T> implements FlowCollector {
|
||||
final /* synthetic */ FlowCollector $this_unsafeFlow;
|
||||
|
||||
/* JADX INFO: renamed from: com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$1$2$1, reason: invalid class name */
|
||||
/* JADX INFO: compiled from: Emitters.kt */
|
||||
@Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
|
||||
@DebugMetadata(c = "com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$1$2", f = "SettingsRepository.kt", i = {}, l = {219}, m = "emit", n = {}, s = {})
|
||||
public static final class AnonymousClass1 extends ContinuationImpl {
|
||||
Object L$0;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
public AnonymousClass1(Continuation continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
return AnonymousClass2.this.emit(null, this);
|
||||
}
|
||||
}
|
||||
|
||||
public AnonymousClass2(FlowCollector flowCollector) {
|
||||
this.$this_unsafeFlow = flowCollector;
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:7:0x0014 */
|
||||
@Override // kotlinx.coroutines.flow.FlowCollector
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public final java.lang.Object emit(java.lang.Object r5, kotlin.coroutines.Continuation r6) throws java.lang.Throwable {
|
||||
/*
|
||||
r4 = this;
|
||||
boolean r0 = r6 instanceof com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$1.AnonymousClass2.AnonymousClass1
|
||||
if (r0 == 0) goto L14
|
||||
r0 = r6
|
||||
com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$1$2$1 r0 = (com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$1.AnonymousClass2.AnonymousClass1) r0
|
||||
int r1 = r0.label
|
||||
r2 = -2147483648(0xffffffff80000000, float:-0.0)
|
||||
r1 = r1 & r2
|
||||
if (r1 == 0) goto L14
|
||||
int r6 = r0.label
|
||||
int r6 = r6 - r2
|
||||
r0.label = r6
|
||||
goto L19
|
||||
L14:
|
||||
com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$1$2$1 r0 = new com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$1$2$1
|
||||
r0.<init>(r6)
|
||||
L19:
|
||||
java.lang.Object r6 = r0.result
|
||||
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r2 = r0.label
|
||||
r3 = 1
|
||||
if (r2 == 0) goto L32
|
||||
if (r2 != r3) goto L2a
|
||||
kotlin.ResultKt.throwOnFailure(r6)
|
||||
goto L53
|
||||
L2a:
|
||||
java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
|
||||
java.lang.String r6 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r5.<init>(r6)
|
||||
throw r5
|
||||
L32:
|
||||
kotlin.ResultKt.throwOnFailure(r6)
|
||||
kotlinx.coroutines.flow.FlowCollector r6 = r4.$this_unsafeFlow
|
||||
r2 = r0
|
||||
kotlin.coroutines.Continuation r2 = (kotlin.coroutines.Continuation) r2
|
||||
androidx.datastore.preferences.core.Preferences r5 = (androidx.datastore.preferences.core.Preferences) r5
|
||||
androidx.datastore.preferences.core.Preferences$Key r2 = com.sistemasolton.itranvias.data.preferences.SettingsRepository.access$getKEY_LANGUAGE$cp()
|
||||
java.lang.Object r5 = r5.get(r2)
|
||||
java.lang.String r5 = (java.lang.String) r5
|
||||
if (r5 != 0) goto L4a
|
||||
java.lang.String r5 = "es"
|
||||
L4a:
|
||||
r0.label = r3
|
||||
java.lang.Object r5 = r6.emit(r5, r0)
|
||||
if (r5 != r1) goto L53
|
||||
return r1
|
||||
L53:
|
||||
kotlin.Unit r5 = kotlin.Unit.INSTANCE
|
||||
return r5
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$1.AnonymousClass2.emit(java.lang.Object, kotlin.coroutines.Continuation):java.lang.Object");
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.flow.Flow
|
||||
public Object collect(FlowCollector<? super String> flowCollector, Continuation continuation) {
|
||||
Object objCollect = data.collect(new AnonymousClass2(flowCollector), continuation);
|
||||
return objCollect == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? objCollect : Unit.INSTANCE;
|
||||
}
|
||||
};
|
||||
final Flow<Preferences> data2 = dataStore.getData();
|
||||
this.themeFlow = new Flow<String>() { // from class: com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$2
|
||||
|
||||
/* JADX INFO: renamed from: com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$2$2, reason: invalid class name */
|
||||
/* JADX INFO: compiled from: Emitters.kt */
|
||||
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0007\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002\"\u0004\b\u0001\u0010\u00032\u0006\u0010\u0004\u001a\u0002H\u0002H\u008a@¢\u0006\u0004\b\u0005\u0010\u0006¨\u0006\b"}, d2 = {"<anonymous>", "", "T", "R", "value", "emit", "(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "kotlinx/coroutines/flow/FlowKt__EmittersKt$unsafeTransform$1$1", "kotlinx/coroutines/flow/FlowKt__TransformKt$map$$inlined$unsafeTransform$1$2"}, k = 3, mv = {2, 1, 0}, xi = 48)
|
||||
public static final class AnonymousClass2<T> implements FlowCollector {
|
||||
final /* synthetic */ FlowCollector $this_unsafeFlow;
|
||||
|
||||
/* JADX INFO: renamed from: com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$2$2$1, reason: invalid class name */
|
||||
/* JADX INFO: compiled from: Emitters.kt */
|
||||
@Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
|
||||
@DebugMetadata(c = "com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$2$2", f = "SettingsRepository.kt", i = {}, l = {219}, m = "emit", n = {}, s = {})
|
||||
public static final class AnonymousClass1 extends ContinuationImpl {
|
||||
Object L$0;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
public AnonymousClass1(Continuation continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
return AnonymousClass2.this.emit(null, this);
|
||||
}
|
||||
}
|
||||
|
||||
public AnonymousClass2(FlowCollector flowCollector) {
|
||||
this.$this_unsafeFlow = flowCollector;
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:7:0x0014 */
|
||||
@Override // kotlinx.coroutines.flow.FlowCollector
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public final java.lang.Object emit(java.lang.Object r5, kotlin.coroutines.Continuation r6) throws java.lang.Throwable {
|
||||
/*
|
||||
r4 = this;
|
||||
boolean r0 = r6 instanceof com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$2.AnonymousClass2.AnonymousClass1
|
||||
if (r0 == 0) goto L14
|
||||
r0 = r6
|
||||
com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$2$2$1 r0 = (com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$2.AnonymousClass2.AnonymousClass1) r0
|
||||
int r1 = r0.label
|
||||
r2 = -2147483648(0xffffffff80000000, float:-0.0)
|
||||
r1 = r1 & r2
|
||||
if (r1 == 0) goto L14
|
||||
int r6 = r0.label
|
||||
int r6 = r6 - r2
|
||||
r0.label = r6
|
||||
goto L19
|
||||
L14:
|
||||
com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$2$2$1 r0 = new com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$2$2$1
|
||||
r0.<init>(r6)
|
||||
L19:
|
||||
java.lang.Object r6 = r0.result
|
||||
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r2 = r0.label
|
||||
r3 = 1
|
||||
if (r2 == 0) goto L32
|
||||
if (r2 != r3) goto L2a
|
||||
kotlin.ResultKt.throwOnFailure(r6)
|
||||
goto L53
|
||||
L2a:
|
||||
java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
|
||||
java.lang.String r6 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r5.<init>(r6)
|
||||
throw r5
|
||||
L32:
|
||||
kotlin.ResultKt.throwOnFailure(r6)
|
||||
kotlinx.coroutines.flow.FlowCollector r6 = r4.$this_unsafeFlow
|
||||
r2 = r0
|
||||
kotlin.coroutines.Continuation r2 = (kotlin.coroutines.Continuation) r2
|
||||
androidx.datastore.preferences.core.Preferences r5 = (androidx.datastore.preferences.core.Preferences) r5
|
||||
androidx.datastore.preferences.core.Preferences$Key r2 = com.sistemasolton.itranvias.data.preferences.SettingsRepository.access$getKEY_THEME$cp()
|
||||
java.lang.Object r5 = r5.get(r2)
|
||||
java.lang.String r5 = (java.lang.String) r5
|
||||
if (r5 != 0) goto L4a
|
||||
java.lang.String r5 = "system"
|
||||
L4a:
|
||||
r0.label = r3
|
||||
java.lang.Object r5 = r6.emit(r5, r0)
|
||||
if (r5 != r1) goto L53
|
||||
return r1
|
||||
L53:
|
||||
kotlin.Unit r5 = kotlin.Unit.INSTANCE
|
||||
return r5
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$2.AnonymousClass2.emit(java.lang.Object, kotlin.coroutines.Continuation):java.lang.Object");
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.flow.Flow
|
||||
public Object collect(FlowCollector<? super String> flowCollector, Continuation continuation) {
|
||||
Object objCollect = data2.collect(new AnonymousClass2(flowCollector), continuation);
|
||||
return objCollect == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? objCollect : Unit.INSTANCE;
|
||||
}
|
||||
};
|
||||
final Flow<Preferences> data3 = dataStore.getData();
|
||||
this.preferredTabFlow = new Flow<String>() { // from class: com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$3
|
||||
|
||||
/* JADX INFO: renamed from: com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$3$2, reason: invalid class name */
|
||||
/* JADX INFO: compiled from: Emitters.kt */
|
||||
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0007\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002\"\u0004\b\u0001\u0010\u00032\u0006\u0010\u0004\u001a\u0002H\u0002H\u008a@¢\u0006\u0004\b\u0005\u0010\u0006¨\u0006\b"}, d2 = {"<anonymous>", "", "T", "R", "value", "emit", "(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "kotlinx/coroutines/flow/FlowKt__EmittersKt$unsafeTransform$1$1", "kotlinx/coroutines/flow/FlowKt__TransformKt$map$$inlined$unsafeTransform$1$2"}, k = 3, mv = {2, 1, 0}, xi = 48)
|
||||
public static final class AnonymousClass2<T> implements FlowCollector {
|
||||
final /* synthetic */ FlowCollector $this_unsafeFlow;
|
||||
|
||||
/* JADX INFO: renamed from: com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$3$2$1, reason: invalid class name */
|
||||
/* JADX INFO: compiled from: Emitters.kt */
|
||||
@Metadata(k = 3, mv = {2, 1, 0}, xi = 48)
|
||||
@DebugMetadata(c = "com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$3$2", f = "SettingsRepository.kt", i = {}, l = {219}, m = "emit", n = {}, s = {})
|
||||
public static final class AnonymousClass1 extends ContinuationImpl {
|
||||
Object L$0;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
public AnonymousClass1(Continuation continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
return AnonymousClass2.this.emit(null, this);
|
||||
}
|
||||
}
|
||||
|
||||
public AnonymousClass2(FlowCollector flowCollector) {
|
||||
this.$this_unsafeFlow = flowCollector;
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:7:0x0014 */
|
||||
@Override // kotlinx.coroutines.flow.FlowCollector
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public final java.lang.Object emit(java.lang.Object r5, kotlin.coroutines.Continuation r6) throws java.lang.Throwable {
|
||||
/*
|
||||
r4 = this;
|
||||
boolean r0 = r6 instanceof com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$3.AnonymousClass2.AnonymousClass1
|
||||
if (r0 == 0) goto L14
|
||||
r0 = r6
|
||||
com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$3$2$1 r0 = (com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$3.AnonymousClass2.AnonymousClass1) r0
|
||||
int r1 = r0.label
|
||||
r2 = -2147483648(0xffffffff80000000, float:-0.0)
|
||||
r1 = r1 & r2
|
||||
if (r1 == 0) goto L14
|
||||
int r6 = r0.label
|
||||
int r6 = r6 - r2
|
||||
r0.label = r6
|
||||
goto L19
|
||||
L14:
|
||||
com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$3$2$1 r0 = new com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$3$2$1
|
||||
r0.<init>(r6)
|
||||
L19:
|
||||
java.lang.Object r6 = r0.result
|
||||
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r2 = r0.label
|
||||
r3 = 1
|
||||
if (r2 == 0) goto L32
|
||||
if (r2 != r3) goto L2a
|
||||
kotlin.ResultKt.throwOnFailure(r6)
|
||||
goto L53
|
||||
L2a:
|
||||
java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
|
||||
java.lang.String r6 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r5.<init>(r6)
|
||||
throw r5
|
||||
L32:
|
||||
kotlin.ResultKt.throwOnFailure(r6)
|
||||
kotlinx.coroutines.flow.FlowCollector r6 = r4.$this_unsafeFlow
|
||||
r2 = r0
|
||||
kotlin.coroutines.Continuation r2 = (kotlin.coroutines.Continuation) r2
|
||||
androidx.datastore.preferences.core.Preferences r5 = (androidx.datastore.preferences.core.Preferences) r5
|
||||
androidx.datastore.preferences.core.Preferences$Key r2 = com.sistemasolton.itranvias.data.preferences.SettingsRepository.access$getKEY_PREFERRED_TAB$cp()
|
||||
java.lang.Object r5 = r5.get(r2)
|
||||
java.lang.String r5 = (java.lang.String) r5
|
||||
if (r5 != 0) goto L4a
|
||||
java.lang.String r5 = "lines"
|
||||
L4a:
|
||||
r0.label = r3
|
||||
java.lang.Object r5 = r6.emit(r5, r0)
|
||||
if (r5 != r1) goto L53
|
||||
return r1
|
||||
L53:
|
||||
kotlin.Unit r5 = kotlin.Unit.INSTANCE
|
||||
return r5
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.sistemasolton.itranvias.data.preferences.SettingsRepository$special$$inlined$map$3.AnonymousClass2.emit(java.lang.Object, kotlin.coroutines.Continuation):java.lang.Object");
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.flow.Flow
|
||||
public Object collect(FlowCollector<? super String> flowCollector, Continuation continuation) {
|
||||
Object objCollect = data3.collect(new AnonymousClass2(flowCollector), continuation);
|
||||
return objCollect == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? objCollect : Unit.INSTANCE;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public final Flow<String> getLanguageFlow() {
|
||||
return this.languageFlow;
|
||||
}
|
||||
|
||||
/* JADX INFO: renamed from: com.sistemasolton.itranvias.data.preferences.SettingsRepository$setLanguage$2, reason: invalid class name and case insensitive filesystem */
|
||||
/* JADX INFO: compiled from: SettingsRepository.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n"}, d2 = {"<anonymous>", "", "preferences", "Landroidx/datastore/preferences/core/MutablePreferences;"}, k = 3, mv = {2, 1, 0}, xi = 48)
|
||||
@DebugMetadata(c = "com.sistemasolton.itranvias.data.preferences.SettingsRepository$setLanguage$2", f = "SettingsRepository.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
|
||||
static final class C06272 extends SuspendLambda implements Function2<MutablePreferences, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ String $language;
|
||||
/* synthetic */ Object L$0;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
C06272(String str, Continuation<? super C06272> continuation) {
|
||||
super(2, continuation);
|
||||
this.$language = str;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
C06272 c06272 = new C06272(this.$language, continuation);
|
||||
c06272.L$0 = obj;
|
||||
return c06272;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(MutablePreferences mutablePreferences, Continuation<? super Unit> continuation) {
|
||||
return ((C06272) create(mutablePreferences, 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) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
((MutablePreferences) this.L$0).set(SettingsRepository.KEY_LANGUAGE, this.$language);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
}
|
||||
|
||||
public final Object setLanguage(String str, Continuation<? super Unit> continuation) {
|
||||
Object objEdit = PreferencesKt.edit(this.dataStore, new C06272(str, null), continuation);
|
||||
return objEdit == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? objEdit : Unit.INSTANCE;
|
||||
}
|
||||
|
||||
public final Flow<String> getThemeFlow() {
|
||||
return this.themeFlow;
|
||||
}
|
||||
|
||||
/* JADX INFO: renamed from: com.sistemasolton.itranvias.data.preferences.SettingsRepository$setTheme$2, reason: invalid class name and case insensitive filesystem */
|
||||
/* JADX INFO: compiled from: SettingsRepository.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n"}, d2 = {"<anonymous>", "", "preferences", "Landroidx/datastore/preferences/core/MutablePreferences;"}, k = 3, mv = {2, 1, 0}, xi = 48)
|
||||
@DebugMetadata(c = "com.sistemasolton.itranvias.data.preferences.SettingsRepository$setTheme$2", f = "SettingsRepository.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
|
||||
static final class C06292 extends SuspendLambda implements Function2<MutablePreferences, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ String $theme;
|
||||
/* synthetic */ Object L$0;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
C06292(String str, Continuation<? super C06292> continuation) {
|
||||
super(2, continuation);
|
||||
this.$theme = str;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
C06292 c06292 = new C06292(this.$theme, continuation);
|
||||
c06292.L$0 = obj;
|
||||
return c06292;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(MutablePreferences mutablePreferences, Continuation<? super Unit> continuation) {
|
||||
return ((C06292) create(mutablePreferences, 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) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
((MutablePreferences) this.L$0).set(SettingsRepository.KEY_THEME, this.$theme);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
}
|
||||
|
||||
public final Object setTheme(String str, Continuation<? super Unit> continuation) {
|
||||
Object objEdit = PreferencesKt.edit(this.dataStore, new C06292(str, null), continuation);
|
||||
return objEdit == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? objEdit : Unit.INSTANCE;
|
||||
}
|
||||
|
||||
public final Flow<String> getPreferredTabFlow() {
|
||||
return this.preferredTabFlow;
|
||||
}
|
||||
|
||||
/* JADX INFO: renamed from: com.sistemasolton.itranvias.data.preferences.SettingsRepository$setPreferredTab$2, reason: invalid class name and case insensitive filesystem */
|
||||
/* JADX INFO: compiled from: SettingsRepository.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n"}, d2 = {"<anonymous>", "", "preferences", "Landroidx/datastore/preferences/core/MutablePreferences;"}, k = 3, mv = {2, 1, 0}, xi = 48)
|
||||
@DebugMetadata(c = "com.sistemasolton.itranvias.data.preferences.SettingsRepository$setPreferredTab$2", f = "SettingsRepository.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
|
||||
static final class C06282 extends SuspendLambda implements Function2<MutablePreferences, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ String $tabRoute;
|
||||
/* synthetic */ Object L$0;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
C06282(String str, Continuation<? super C06282> continuation) {
|
||||
super(2, continuation);
|
||||
this.$tabRoute = str;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
C06282 c06282 = new C06282(this.$tabRoute, continuation);
|
||||
c06282.L$0 = obj;
|
||||
return c06282;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(MutablePreferences mutablePreferences, Continuation<? super Unit> continuation) {
|
||||
return ((C06282) create(mutablePreferences, 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) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
((MutablePreferences) this.L$0).set(SettingsRepository.KEY_PREFERRED_TAB, this.$tabRoute);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
}
|
||||
|
||||
public final Object setPreferredTab(String str, Continuation<? super Unit> continuation) {
|
||||
Object objEdit = PreferencesKt.edit(this.dataStore, new C06282(str, null), continuation);
|
||||
return objEdit == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? objEdit : Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* JADX INFO: renamed from: com.sistemasolton.itranvias.data.preferences.SettingsRepository$clearPreferredTab$2, reason: invalid class name */
|
||||
/* JADX INFO: compiled from: SettingsRepository.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n"}, d2 = {"<anonymous>", "", "preferences", "Landroidx/datastore/preferences/core/MutablePreferences;"}, k = 3, mv = {2, 1, 0}, xi = 48)
|
||||
@DebugMetadata(c = "com.sistemasolton.itranvias.data.preferences.SettingsRepository$clearPreferredTab$2", f = "SettingsRepository.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
|
||||
static final class AnonymousClass2 extends SuspendLambda implements Function2<MutablePreferences, Continuation<? super Unit>, Object> {
|
||||
/* synthetic */ Object L$0;
|
||||
int label;
|
||||
|
||||
AnonymousClass2(Continuation<? super AnonymousClass2> continuation) {
|
||||
super(2, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
AnonymousClass2 anonymousClass2 = new AnonymousClass2(continuation);
|
||||
anonymousClass2.L$0 = obj;
|
||||
return anonymousClass2;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(MutablePreferences mutablePreferences, Continuation<? super Unit> continuation) {
|
||||
return ((AnonymousClass2) create(mutablePreferences, 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) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
((MutablePreferences) this.L$0).remove(SettingsRepository.KEY_PREFERRED_TAB);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
}
|
||||
|
||||
public final Object clearPreferredTab(Continuation<? super Unit> continuation) {
|
||||
Object objEdit = PreferencesKt.edit(this.dataStore, new AnonymousClass2(null), continuation);
|
||||
return objEdit == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? objEdit : Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:7:0x0014 */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public final java.lang.Object isMigrationCompleted(kotlin.coroutines.Continuation<? super java.lang.Boolean> r5) throws java.lang.Throwable {
|
||||
/*
|
||||
r4 = this;
|
||||
boolean r0 = r5 instanceof com.sistemasolton.itranvias.data.preferences.SettingsRepository.AnonymousClass1
|
||||
if (r0 == 0) goto L14
|
||||
r0 = r5
|
||||
com.sistemasolton.itranvias.data.preferences.SettingsRepository$isMigrationCompleted$1 r0 = (com.sistemasolton.itranvias.data.preferences.SettingsRepository.AnonymousClass1) r0
|
||||
int r1 = r0.label
|
||||
r2 = -2147483648(0xffffffff80000000, float:-0.0)
|
||||
r1 = r1 & r2
|
||||
if (r1 == 0) goto L14
|
||||
int r5 = r0.label
|
||||
int r5 = r5 - r2
|
||||
r0.label = r5
|
||||
goto L19
|
||||
L14:
|
||||
com.sistemasolton.itranvias.data.preferences.SettingsRepository$isMigrationCompleted$1 r0 = new com.sistemasolton.itranvias.data.preferences.SettingsRepository$isMigrationCompleted$1
|
||||
r0.<init>(r5)
|
||||
L19:
|
||||
java.lang.Object r5 = r0.result
|
||||
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r2 = r0.label
|
||||
r3 = 1
|
||||
if (r2 == 0) goto L32
|
||||
if (r2 != r3) goto L2a
|
||||
kotlin.ResultKt.throwOnFailure(r5)
|
||||
goto L44
|
||||
L2a:
|
||||
java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
|
||||
java.lang.String r0 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r5.<init>(r0)
|
||||
throw r5
|
||||
L32:
|
||||
kotlin.ResultKt.throwOnFailure(r5)
|
||||
androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences> r5 = r4.dataStore
|
||||
kotlinx.coroutines.flow.Flow r5 = r5.getData()
|
||||
r0.label = r3
|
||||
java.lang.Object r5 = kotlinx.coroutines.flow.FlowKt.first(r5, r0)
|
||||
if (r5 != r1) goto L44
|
||||
return r1
|
||||
L44:
|
||||
androidx.datastore.preferences.core.Preferences r5 = (androidx.datastore.preferences.core.Preferences) r5
|
||||
androidx.datastore.preferences.core.Preferences$Key<java.lang.String> r0 = com.sistemasolton.itranvias.data.preferences.SettingsRepository.KEY_MIGRATION_COMPLETED
|
||||
java.lang.Object r5 = r5.get(r0)
|
||||
java.lang.String r0 = "true"
|
||||
boolean r5 = kotlin.jvm.internal.Intrinsics.areEqual(r5, r0)
|
||||
java.lang.Boolean r5 = kotlin.coroutines.jvm.internal.Boxing.boxBoolean(r5)
|
||||
return r5
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.sistemasolton.itranvias.data.preferences.SettingsRepository.isMigrationCompleted(kotlin.coroutines.Continuation):java.lang.Object");
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:7:0x0014 */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public final java.lang.Object migrateFromOldSettings(java.lang.String r6, java.lang.String r7, java.lang.String r8, kotlin.coroutines.Continuation<? super kotlin.Unit> r9) throws java.lang.Throwable {
|
||||
/*
|
||||
r5 = this;
|
||||
boolean r0 = r9 instanceof com.sistemasolton.itranvias.data.preferences.SettingsRepository.C06251
|
||||
if (r0 == 0) goto L14
|
||||
r0 = r9
|
||||
com.sistemasolton.itranvias.data.preferences.SettingsRepository$migrateFromOldSettings$1 r0 = (com.sistemasolton.itranvias.data.preferences.SettingsRepository.C06251) r0
|
||||
int r1 = r0.label
|
||||
r2 = -2147483648(0xffffffff80000000, float:-0.0)
|
||||
r1 = r1 & r2
|
||||
if (r1 == 0) goto L14
|
||||
int r9 = r0.label
|
||||
int r9 = r9 - r2
|
||||
r0.label = r9
|
||||
goto L19
|
||||
L14:
|
||||
com.sistemasolton.itranvias.data.preferences.SettingsRepository$migrateFromOldSettings$1 r0 = new com.sistemasolton.itranvias.data.preferences.SettingsRepository$migrateFromOldSettings$1
|
||||
r0.<init>(r9)
|
||||
L19:
|
||||
java.lang.Object r9 = r0.result
|
||||
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r2 = r0.label
|
||||
r3 = 2
|
||||
r4 = 1
|
||||
if (r2 == 0) goto L47
|
||||
if (r2 == r4) goto L35
|
||||
if (r2 != r3) goto L2d
|
||||
kotlin.ResultKt.throwOnFailure(r9)
|
||||
goto L7d
|
||||
L2d:
|
||||
java.lang.IllegalStateException r6 = new java.lang.IllegalStateException
|
||||
java.lang.String r7 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r6.<init>(r7)
|
||||
throw r6
|
||||
L35:
|
||||
java.lang.Object r6 = r0.L$2
|
||||
r8 = r6
|
||||
java.lang.String r8 = (java.lang.String) r8
|
||||
java.lang.Object r6 = r0.L$1
|
||||
r7 = r6
|
||||
java.lang.String r7 = (java.lang.String) r7
|
||||
java.lang.Object r6 = r0.L$0
|
||||
java.lang.String r6 = (java.lang.String) r6
|
||||
kotlin.ResultKt.throwOnFailure(r9)
|
||||
goto L59
|
||||
L47:
|
||||
kotlin.ResultKt.throwOnFailure(r9)
|
||||
r0.L$0 = r6
|
||||
r0.L$1 = r7
|
||||
r0.L$2 = r8
|
||||
r0.label = r4
|
||||
java.lang.Object r9 = r5.isMigrationCompleted(r0)
|
||||
if (r9 != r1) goto L59
|
||||
return r1
|
||||
L59:
|
||||
java.lang.Boolean r9 = (java.lang.Boolean) r9
|
||||
boolean r9 = r9.booleanValue()
|
||||
if (r9 == 0) goto L64
|
||||
kotlin.Unit r6 = kotlin.Unit.INSTANCE
|
||||
return r6
|
||||
L64:
|
||||
androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences> r9 = r5.dataStore
|
||||
com.sistemasolton.itranvias.data.preferences.SettingsRepository$migrateFromOldSettings$2 r2 = new com.sistemasolton.itranvias.data.preferences.SettingsRepository$migrateFromOldSettings$2
|
||||
r4 = 0
|
||||
r2.<init>(r6, r7, r8, r4)
|
||||
kotlin.jvm.functions.Function2 r2 = (kotlin.jvm.functions.Function2) r2
|
||||
r0.L$0 = r4
|
||||
r0.L$1 = r4
|
||||
r0.L$2 = r4
|
||||
r0.label = r3
|
||||
java.lang.Object r6 = androidx.datastore.preferences.core.PreferencesKt.edit(r9, r2, r0)
|
||||
if (r6 != r1) goto L7d
|
||||
return r1
|
||||
L7d:
|
||||
kotlin.Unit r6 = kotlin.Unit.INSTANCE
|
||||
return r6
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.sistemasolton.itranvias.data.preferences.SettingsRepository.migrateFromOldSettings(java.lang.String, java.lang.String, java.lang.String, kotlin.coroutines.Continuation):java.lang.Object");
|
||||
}
|
||||
|
||||
/* JADX INFO: renamed from: com.sistemasolton.itranvias.data.preferences.SettingsRepository$migrateFromOldSettings$2, reason: invalid class name and case insensitive filesystem */
|
||||
/* JADX INFO: compiled from: SettingsRepository.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n"}, d2 = {"<anonymous>", "", "preferences", "Landroidx/datastore/preferences/core/MutablePreferences;"}, k = 3, mv = {2, 1, 0}, xi = 48)
|
||||
@DebugMetadata(c = "com.sistemasolton.itranvias.data.preferences.SettingsRepository$migrateFromOldSettings$2", f = "SettingsRepository.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
|
||||
static final class C06262 extends SuspendLambda implements Function2<MutablePreferences, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ String $oldLanguage;
|
||||
final /* synthetic */ String $oldPreferredTab;
|
||||
final /* synthetic */ String $oldTheme;
|
||||
/* synthetic */ Object L$0;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
C06262(String str, String str2, String str3, Continuation<? super C06262> continuation) {
|
||||
super(2, continuation);
|
||||
this.$oldLanguage = str;
|
||||
this.$oldTheme = str2;
|
||||
this.$oldPreferredTab = str3;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
C06262 c06262 = new C06262(this.$oldLanguage, this.$oldTheme, this.$oldPreferredTab, continuation);
|
||||
c06262.L$0 = obj;
|
||||
return c06262;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(MutablePreferences mutablePreferences, Continuation<? super Unit> continuation) {
|
||||
return ((C06262) create(mutablePreferences, 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);
|
||||
MutablePreferences mutablePreferences = (MutablePreferences) this.L$0;
|
||||
String str = this.$oldLanguage;
|
||||
if (str != null) {
|
||||
mutablePreferences.set(SettingsRepository.KEY_LANGUAGE, str);
|
||||
}
|
||||
String str2 = this.$oldTheme;
|
||||
if (str2 != null) {
|
||||
mutablePreferences.set(SettingsRepository.KEY_THEME, str2);
|
||||
}
|
||||
String str3 = this.$oldPreferredTab;
|
||||
if (str3 != null) {
|
||||
mutablePreferences.set(SettingsRepository.KEY_PREFERRED_TAB, str3);
|
||||
}
|
||||
mutablePreferences.set(SettingsRepository.KEY_MIGRATION_COMPLETED, "true");
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user