Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Add fixes to some files that accidentally weren't added in an earlier…
Browse files Browse the repository at this point in the history
… commit
  • Loading branch information
M3DZIK committed Aug 2, 2024
1 parent 11e3f6c commit 34ca758
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ class MainActivity : FragmentActivity() {
finish()
}

MigrationsManager.run(this, repository)

// retrieves aes key for vault decryption if key is valid
// vault.getSecretsIfNotExpired(this)

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import dev.medzik.android.compose.icons.TopAppBarBackIcon
import dev.medzik.android.compose.theme.spacing
import dev.medzik.android.compose.ui.LoadingButton
import dev.medzik.android.compose.ui.textfield.TextFieldValue
import dev.medzik.librepass.android.business.injection.VaultCacheModule
import dev.medzik.librepass.android.database.Repository
import dev.medzik.librepass.android.ui.R
import kotlinx.serialization.Serializable
Expand Down Expand Up @@ -133,8 +132,7 @@ fun LoginScreenPreview() {
navController = rememberNavController(),
viewModel = LoginViewModel(
context = context,
repository = repository,
vaultCache = VaultCacheModule.provideVaultCache(repository)
repository = repository
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,18 @@ import androidx.lifecycle.ViewModel
import dagger.hilt.android.lifecycle.HiltViewModel
import dagger.hilt.android.qualifiers.ApplicationContext
import dev.medzik.android.utils.showToast
import dev.medzik.librepass.android.business.VaultCache
import dev.medzik.librepass.android.common.haveNetworkConnection
import dev.medzik.librepass.android.database.Credentials
import dev.medzik.librepass.android.database.Repository
import dev.medzik.librepass.android.ui.R
import dev.medzik.librepass.client.Server
import dev.medzik.librepass.client.api.AuthClient
import dev.medzik.librepass.utils.fromHex
import javax.inject.Inject

@HiltViewModel
class LoginViewModel @Inject constructor(
@ApplicationContext private val context: Context,
private val repository: Repository,
private val vaultCache: VaultCache
private val repository: Repository
) : ViewModel() {
var email = mutableStateOf("")
var password = mutableStateOf("")
Expand Down Expand Up @@ -54,7 +51,7 @@ class LoginViewModel @Inject constructor(
)
repository.credentials.insert(credentialsDbEntry)

vaultCache.aesKey = credentials.aesKey.fromHex()
// vaultCache.aesKey = credentials.aesKey.fromHex()
} catch (e: Exception) {
// TODO
}
Expand Down

0 comments on commit 34ca758

Please sign in to comment.