diff --git a/android/build.gradle.kts b/android/build.gradle.kts index b41d0e7a..d83b2709 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -70,7 +70,6 @@ dependencies { implementation(libs.androidx.compose.material3) implementation(libs.androidx.compose.material3.window.size) implementation(libs.androidx.core.splashscreen) - implementation(libs.androidx.datastore.preferences) implementation(libs.androidx.lifecycle.compose) implementation(libs.androidx.navigation.compose) implementation(libs.androidx.paging.compose) diff --git a/android/src/main/kotlin/dev/msfjarvis/claw/android/injection/DataStoreModule.kt b/android/src/main/kotlin/dev/msfjarvis/claw/android/injection/DataStoreModule.kt deleted file mode 100644 index cc668af0..00000000 --- a/android/src/main/kotlin/dev/msfjarvis/claw/android/injection/DataStoreModule.kt +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright © 2023 Harsh Shandilya. - * Use of this source code is governed by an MIT-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/MIT. - */ -package dev.msfjarvis.claw.android.injection - -import android.content.Context -import androidx.datastore.core.DataStore -import androidx.datastore.preferences.core.PreferenceDataStoreFactory -import androidx.datastore.preferences.core.Preferences -import androidx.datastore.preferences.preferencesDataStoreFile -import com.deliveryhero.whetstone.app.ApplicationScope -import com.squareup.anvil.annotations.ContributesTo -import com.squareup.anvil.annotations.optional.ForScope -import dagger.Module -import dagger.Provides -import dev.msfjarvis.claw.core.coroutines.DispatcherProvider -import javax.inject.Singleton -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.SupervisorJob - -@Module -@ContributesTo(ApplicationScope::class) -class DataStoreModule { - - @Singleton - @Provides - fun provideLoginDatastore( - @ForScope(ApplicationScope::class) context: Context, - dispatcherProvider: DispatcherProvider, - ): DataStore { - return PreferenceDataStoreFactory.create( - corruptionHandler = null, - migrations = emptyList(), - scope = CoroutineScope(dispatcherProvider.io() + SupervisorJob()), - ) { - context.preferencesDataStoreFile("login") - } - } -} diff --git a/android/src/main/kotlin/dev/msfjarvis/claw/android/settings/LoginSettings.kt b/android/src/main/kotlin/dev/msfjarvis/claw/android/settings/LoginSettings.kt deleted file mode 100644 index c7f01550..00000000 --- a/android/src/main/kotlin/dev/msfjarvis/claw/android/settings/LoginSettings.kt +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright © 2023 Harsh Shandilya. - * Use of this source code is governed by an MIT-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/MIT. - */ -package dev.msfjarvis.claw.android.settings - -import androidx.datastore.core.DataStore -import androidx.datastore.preferences.core.Preferences -import androidx.datastore.preferences.core.stringPreferencesKey -import javax.inject.Inject - -class LoginSettings -@Inject -constructor( - val dataStore: DataStore, -) { - companion object { - val CSRF_TOKEN = stringPreferencesKey("csrf_token") - val LOGIN_COOKIE = stringPreferencesKey("login_cookie") - } -} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 314db2de..406eabcf 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -34,7 +34,6 @@ androidx-compose-ui-text = { module = "androidx.compose.ui:ui-text" } androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" } androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" } androidx-core-splashscreen = "androidx.core:core-splashscreen:1.0.1" -androidx-datastore-preferences = "androidx.datastore:datastore-preferences:1.1.0-alpha05" androidx-lifecycle-compose = "androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2" androidx-navigation-compose = "androidx.navigation:navigation-compose:2.7.3" androidx-paging-compose = "androidx.paging:paging-compose:3.2.1"