diff options
6 files changed, 1 insertions, 15 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() diff --git a/format-common/src/main/kotlin/app/passwordstore/data/passfile/PasswordEntry.kt b/format-common/src/main/kotlin/app/passwordstore/data/passfile/PasswordEntry.kt index d2d16efd..1618374f 100644 --- a/format-common/src/main/kotlin/app/passwordstore/data/passfile/PasswordEntry.kt +++ b/format-common/src/main/kotlin/app/passwordstore/data/passfile/PasswordEntry.kt @@ -17,14 +17,12 @@ import kotlin.collections.set import kotlin.coroutines.coroutineContext import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.seconds -import kotlin.time.ExperimentalTime import kotlinx.coroutines.delay import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flow import kotlinx.coroutines.isActive /** Represents a single entry in the password store. */ -@OptIn(ExperimentalTime::class) public class PasswordEntry @AssistedInject constructor( diff --git a/format-common/src/main/kotlin/app/passwordstore/data/passfile/Totp.kt b/format-common/src/main/kotlin/app/passwordstore/data/passfile/Totp.kt index 2f42977b..c279360f 100644 --- a/format-common/src/main/kotlin/app/passwordstore/data/passfile/Totp.kt +++ b/format-common/src/main/kotlin/app/passwordstore/data/passfile/Totp.kt @@ -1,8 +1,6 @@ package app.passwordstore.data.passfile import kotlin.time.Duration -import kotlin.time.ExperimentalTime /** Holder for a TOTP secret and the duration for which it is valid. */ -@OptIn(ExperimentalTime::class) public data class Totp(public val value: String, public val remainingTime: Duration) diff --git a/ui-compose/src/main/kotlin/app/passwordstore/ui/compose/PasswordField.kt b/ui-compose/src/main/kotlin/app/passwordstore/ui/compose/PasswordField.kt index 2bdf2de3..ee202486 100644 --- a/ui-compose/src/main/kotlin/app/passwordstore/ui/compose/PasswordField.kt +++ b/ui-compose/src/main/kotlin/app/passwordstore/ui/compose/PasswordField.kt @@ -1,6 +1,5 @@ package app.passwordstore.ui.compose -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.Text @@ -15,7 +14,6 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.text.input.PasswordVisualTransformation import androidx.compose.ui.text.input.VisualTransformation -@OptIn(ExperimentalMaterial3Api::class) @Composable public fun PasswordField( value: String, |