diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2023-06-27 17:28:54 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2023-06-27 18:07:29 +0530 |
commit | ee6895b2e8664c1b30b01be9ee390852592d4767 (patch) | |
tree | 5a6984644f504a1cac2296da2732ac91accb9811 /app/src/main/java | |
parent | 6263e374d8082df892af79d5a41b66f8793bac2b (diff) |
chore: cleanup IDE warnings
Diffstat (limited to 'app/src/main/java')
3 files changed, 1 insertions, 9 deletions
diff --git a/app/src/main/java/app/passwordstore/data/password/FieldItem.kt b/app/src/main/java/app/passwordstore/data/password/FieldItem.kt index 49ed4c82..9997fcda 100644 --- a/app/src/main/java/app/passwordstore/data/password/FieldItem.kt +++ b/app/src/main/java/app/passwordstore/data/password/FieldItem.kt @@ -6,9 +6,7 @@ package app.passwordstore.data.password import app.passwordstore.data.passfile.Totp -import kotlin.time.ExperimentalTime -@OptIn(ExperimentalTime::class) class FieldItem(val key: String, val value: String, val action: ActionType) { enum class ActionType { COPY, diff --git a/app/src/main/java/app/passwordstore/ui/crypto/DecryptScreen.kt b/app/src/main/java/app/passwordstore/ui/crypto/DecryptScreen.kt index 64257709..652ba1ae 100644 --- a/app/src/main/java/app/passwordstore/ui/crypto/DecryptScreen.kt +++ b/app/src/main/java/app/passwordstore/ui/crypto/DecryptScreen.kt @@ -4,7 +4,6 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme @@ -30,7 +29,6 @@ import app.passwordstore.ui.compose.PasswordField import app.passwordstore.ui.compose.theme.APSThemePreview import app.passwordstore.util.time.UserClock import app.passwordstore.util.totp.UriTotpFinder -import kotlin.time.ExperimentalTime import kotlinx.coroutines.flow.first import kotlinx.coroutines.runBlocking @@ -45,7 +43,6 @@ import kotlinx.coroutines.runBlocking * When [readOnly] is `false`, the [TextField]s are rendered editable but currently do not pass up * their "updated" state to anything. This will be changed in later commits. */ -@OptIn(ExperimentalTime::class, ExperimentalMaterial3Api::class) @Composable fun PasswordEntryScreen( entryName: String, @@ -84,7 +81,7 @@ fun PasswordEntryScreen( TextField( value = totp.value, onValueChange = {}, - readOnly = readOnly, + readOnly = true, label = { Text("OTP (expires in ${totp.remainingTime.inWholeSeconds}s)") }, trailingIcon = { CopyButton({ totp.value }) }, modifier = Modifier.padding(bottom = 8.dp), @@ -107,7 +104,6 @@ fun PasswordEntryScreen( } @Composable -@OptIn(ExperimentalMaterial3Api::class) private fun ExtraContent( entry: PasswordEntry, readOnly: Boolean, diff --git a/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyListActivity.kt b/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyListActivity.kt index 6a65daaf..5c932545 100644 --- a/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyListActivity.kt +++ b/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyListActivity.kt @@ -8,7 +8,6 @@ import androidx.activity.compose.setContent import androidx.activity.result.contract.ActivityResultContracts.StartActivityForResult import androidx.activity.viewModels import androidx.compose.foundation.layout.padding -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -25,7 +24,6 @@ import app.passwordstore.util.viewmodel.PGPKeyListViewModel import dagger.hilt.android.AndroidEntryPoint @AndroidEntryPoint -@OptIn(ExperimentalMaterial3Api::class) class PGPKeyListActivity : ComponentActivity() { private val viewModel: PGPKeyListViewModel by viewModels() |