refactor: Migrate some of the deprecated methods

This commit is contained in:
Artem Chepurnoy 2024-06-01 22:03:18 +03:00
parent f94d5768aa
commit e2870c186f
No known key found for this signature in database
GPG Key ID: FAC37D0CF674043E
41 changed files with 107 additions and 112 deletions

View File

@ -1,6 +1,7 @@
package com.artemchep.keyguard.common.model
import arrow.core.Either
import arrow.core.Either.Companion.catch
import arrow.core.flatten
import arrow.core.right
import io.ktor.http.Url
@ -13,7 +14,7 @@ sealed interface TotpToken {
companion object {
fun parse(
url: String,
): Either<Throwable, TotpToken> = Either.catchAndFlatten {
): Either<Throwable, TotpToken> = catch {
when {
url.startsWith(PREFIX_OTP_AUTH) -> parseOtpAuth(url)
url.startsWith(PREFIX_OTP_STEAM) -> parseOtpSteam(url)
@ -29,7 +30,7 @@ sealed interface TotpToken {
.right()
}
}
}
}.flatten()
}
val raw: String

View File

@ -37,7 +37,7 @@ class GeneratorWordlistRepositoryImpl(
DGeneratorWordlist(
idRaw = entity.id,
name = entity.name,
wordCount = entity.wordCount ?: 0,
wordCount = entity.wordCount,
createdDate = entity.createdAt,
)
}

View File

@ -204,14 +204,14 @@ class DownloadAttachmentImpl2(
url = requireNotNull(model.url),
urlIsOneTime = true,
name = model.fileName,
encryptionKey = base64Service.decode(model.keyBase64!!),
encryptionKey = base64Service.decode(model.keyBase64),
)
}.getOrElse {
AttachmentData(
url = requireNotNull(attachment.url),
urlIsOneTime = false,
name = attachment.fileName,
encryptionKey = base64Service.decode(attachment.keyBase64!!),
encryptionKey = base64Service.decode(attachment.keyBase64),
)
}
}

View File

@ -70,12 +70,10 @@ fun RGBToHSL(
s = 0f
h = s
} else {
h = if (max == rf) {
(gf - bf) / deltaMaxMin % 6f
} else if (max == gf) {
(bf - rf) / deltaMaxMin + 2f
} else {
(rf - gf) / deltaMaxMin + 4f
h = when (max) {
rf -> (gf - bf) / deltaMaxMin % 6f
gf -> (bf - rf) / deltaMaxMin + 2f
else -> (rf - gf) / deltaMaxMin + 4f
}
s = (deltaMaxMin / (1f - abs((2f * l - 1f).toDouble()))).toFloat()
}

View File

@ -1,14 +1,14 @@
package com.artemchep.keyguard.feature.attachments
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.OpenInNew
import androidx.compose.material.icons.automirrored.outlined.Send
import androidx.compose.material.icons.outlined.Cancel
import androidx.compose.material.icons.outlined.Delete
import androidx.compose.material.icons.outlined.Download
import androidx.compose.material.icons.outlined.FileOpen
import androidx.compose.material.icons.outlined.FolderOpen
import androidx.compose.material.icons.outlined.OpenInNew
import androidx.compose.material.icons.outlined.Refresh
import androidx.compose.material.icons.outlined.Send
import androidx.compose.runtime.Composable
import arrow.core.identity
import arrow.core.partially1
@ -618,7 +618,7 @@ fun foo(
}
if (CurrentPlatform is Platform.Mobile) {
this += FlatItemAction(
leading = icon(Icons.Outlined.Send),
leading = icon(Icons.AutoMirrored.Outlined.Send),
trailing = {
ChevronIcon()
},
@ -643,7 +643,7 @@ fun foo(
if (launchViewCipherData != null) {
section {
this += FlatItemAction(
leading = icon(Icons.Outlined.OpenInNew),
leading = icon(Icons.AutoMirrored.Outlined.OpenInNew),
trailing = {
ChevronIcon()
},

View File

@ -27,11 +27,11 @@ import androidx.compose.foundation.layout.sizeIn
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.widthIn
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.Launch
import androidx.compose.material.icons.outlined.Download
import androidx.compose.material.icons.outlined.DownloadDone
import androidx.compose.material.icons.outlined.ErrorOutline
import androidx.compose.material.icons.outlined.Info
import androidx.compose.material.icons.outlined.Launch
import androidx.compose.material3.Checkbox
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
@ -135,9 +135,9 @@ fun ItemAttachment(
}
val p = animateFloatAsState(updatedProgressState.value)
LinearProgressIndicator(
progress = { p.value },
modifier = Modifier
.fillMaxWidth(),
progress = p.value,
)
} else {
LinearProgressIndicator(
@ -355,7 +355,7 @@ private fun ItemAttachmentLayout(
},
) {
Icon(
imageVector = Icons.Outlined.Launch,
imageVector = Icons.AutoMirrored.Outlined.Launch,
contentDescription = null,
)
}

View File

@ -13,7 +13,7 @@ import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.items
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Launch
import androidx.compose.material.icons.automirrored.outlined.Launch
import androidx.compose.material.icons.outlined.SearchOff
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
@ -94,7 +94,7 @@ fun AccountViewScreen(
},
) {
Icon(
imageVector = Icons.Outlined.Launch,
imageVector = Icons.AutoMirrored.Outlined.Launch,
contentDescription = null,
)
Spacer(

View File

@ -6,15 +6,15 @@ import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.HelpOutline
import androidx.compose.material.icons.automirrored.outlined.Login
import androidx.compose.material.icons.automirrored.outlined.Logout
import androidx.compose.material.icons.automirrored.outlined.Send
import androidx.compose.material.icons.outlined.ColorLens
import androidx.compose.material.icons.outlined.Edit
import androidx.compose.material.icons.outlined.Fingerprint
import androidx.compose.material.icons.outlined.Folder
import androidx.compose.material.icons.outlined.HelpOutline
import androidx.compose.material.icons.outlined.Login
import androidx.compose.material.icons.outlined.Logout
import androidx.compose.material.icons.outlined.Security
import androidx.compose.material.icons.outlined.Send
import androidx.compose.material.icons.outlined.VerifiedUser
import androidx.compose.material.icons.outlined.VisibilityOff
import androidx.compose.material3.Badge
@ -214,7 +214,7 @@ fun accountState(
suspend fun doRemoveAccountById(accountId: AccountId) {
val intent = createConfirmationDialogIntent(
icon = icon(Icons.Outlined.Logout),
icon = icon(Icons.AutoMirrored.Outlined.Logout),
title = translate(Res.string.account_log_out_confirmation_title),
message = translate(Res.string.account_log_out_confirmation_text),
) {
@ -318,7 +318,7 @@ fun accountState(
val env = t.env.back()
AccountViewState.Content.Data.PrimaryAction(
text = translate(Res.string.account_action_sign_in_title),
icon = Icons.Outlined.Login,
icon = Icons.AutoMirrored.Outlined.Login,
onClick = ::doReLogin
.partially1(accountId)
.partially1(email)
@ -424,7 +424,7 @@ fun accountState(
}
this += FlatItemAction(
icon = Icons.Outlined.Logout,
icon = Icons.AutoMirrored.Outlined.Logout,
title = Res.string.account_action_sign_out_title.wrap(),
onClick = if (busy) {
null
@ -589,7 +589,7 @@ private fun buildItemsFlow(
)
},
) {
Icon(Icons.Outlined.Send, null)
Icon(Icons.AutoMirrored.Outlined.Send, null)
}
},
trailing = {
@ -1079,7 +1079,7 @@ private suspend fun FlowCollector<VaultViewItem>.emitMasterPasswordHint(
value = hint.orEmpty(),
private = true,
leading = {
Icon(Icons.Outlined.HelpOutline, null)
Icon(Icons.AutoMirrored.Outlined.HelpOutline, null)
},
dropdown = buildContextItems {
if (!hint.isNullOrBlank()) {
@ -1144,7 +1144,7 @@ private suspend fun FlowCollector<VaultViewItem>.emitFingerprint(
}
section {
this += FlatItemAction(
icon = Icons.Outlined.HelpOutline,
icon = Icons.AutoMirrored.Outlined.HelpOutline,
title = Res.string.fingerprint_phrase_help_title.wrap(),
trailing = {
ChevronIcon()

View File

@ -18,8 +18,8 @@ import androidx.compose.foundation.text.KeyboardActionScope
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.Login
import androidx.compose.material.icons.outlined.Add
import androidx.compose.material.icons.outlined.Login
import androidx.compose.material.icons.outlined.Security
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.DropdownMenu
@ -252,7 +252,7 @@ fun LoginContent(
)
} else {
Icon(
imageVector = Icons.Outlined.Login,
imageVector = Icons.AutoMirrored.Outlined.Login,
contentDescription = null,
)
}

View File

@ -19,9 +19,9 @@ import androidx.compose.foundation.text.KeyboardActionScope
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.Launch
import androidx.compose.material.icons.automirrored.outlined.Login
import androidx.compose.material.icons.outlined.Construction
import androidx.compose.material.icons.outlined.Launch
import androidx.compose.material.icons.outlined.Login
import androidx.compose.material.icons.outlined.MailOutline
import androidx.compose.material.icons.outlined.Refresh
import androidx.compose.material3.Checkbox
@ -158,13 +158,13 @@ fun LoginTwofaScreenContent(
when (icon) {
LoginTwofaState.PrimaryAction.Icon.LOGIN ->
Icon(
imageVector = Icons.Outlined.Login,
imageVector = Icons.AutoMirrored.Outlined.Login,
contentDescription = null,
)
LoginTwofaState.PrimaryAction.Icon.LAUNCH ->
Icon(
imageVector = Icons.Outlined.Launch,
imageVector = Icons.AutoMirrored.Outlined.Launch,
contentDescription = null,
)

View File

@ -1,7 +1,7 @@
package com.artemchep.keyguard.feature.emailleak
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.FactCheck
import androidx.compose.material.icons.automirrored.outlined.FactCheck
import androidx.compose.runtime.Composable
import com.artemchep.keyguard.common.model.AccountId
import com.artemchep.keyguard.feature.localization.wrap
@ -35,7 +35,7 @@ data class EmailLeakRoute(
email: String,
navigate: (NavigationIntent) -> Unit,
) = FlatItemAction(
leading = icon(Icons.Outlined.FactCheck),
leading = icon(Icons.AutoMirrored.Outlined.FactCheck),
title = Res.string.email_action_check_data_breach_title.wrap(),
onClick = {
val route = EmailLeakRoute(
@ -67,7 +67,7 @@ data class EmailLeakRoute(
username: String,
navigate: (NavigationIntent) -> Unit,
) = FlatItemAction(
leading = icon(Icons.Outlined.FactCheck),
leading = icon(Icons.AutoMirrored.Outlined.FactCheck),
title = Res.string.username_action_check_data_breach_title.wrap(),
onClick = {
val route = EmailLeakRoute(

View File

@ -14,7 +14,7 @@ import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.FactCheck
import androidx.compose.material.icons.automirrored.outlined.FactCheck
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ProvideTextStyle
@ -62,7 +62,7 @@ fun EmailLeakScreen(
args = args,
)
Dialog(
icon = icon(Icons.Outlined.FactCheck),
icon = icon(Icons.AutoMirrored.Outlined.FactCheck),
title = {
Text(stringResource(Res.string.emailleak_title))
},

View File

@ -6,8 +6,8 @@ import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.Send
import androidx.compose.material.icons.outlined.Info
import androidx.compose.material.icons.outlined.Send
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.LocalContentColor
@ -84,7 +84,7 @@ private fun FeedbackContent(
floatingActionButton = {
DefaultFab(
icon = {
Icon(Icons.Outlined.Send, null)
Icon(Icons.AutoMirrored.Outlined.Send, null)
},
text = {
Text(

View File

@ -1,7 +1,7 @@
package com.artemchep.keyguard.feature.generator.emailrelay
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.ForwardToInbox
import androidx.compose.material.icons.automirrored.outlined.ForwardToInbox
import androidx.compose.runtime.Composable
import com.artemchep.keyguard.feature.localization.wrap
import com.artemchep.keyguard.feature.navigation.NavigationIntent
@ -26,7 +26,7 @@ object EmailRelayListRoute : Route {
translator: TranslatorScope,
navigate: (NavigationIntent) -> Unit,
) = FlatItemAction(
leading = iconSmall(Icons.Outlined.ForwardToInbox),
leading = iconSmall(Icons.AutoMirrored.Outlined.ForwardToInbox),
title = Res.string.emailrelay_list_header_title.wrap(),
trailing = {
ChevronIcon()

View File

@ -6,10 +6,10 @@ import androidx.compose.foundation.lazy.LazyListScope
import androidx.compose.foundation.lazy.items
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.ForwardToInbox
import androidx.compose.material.icons.outlined.AlternateEmail
import androidx.compose.material.icons.outlined.ContentCopy
import androidx.compose.material.icons.outlined.Email
import androidx.compose.material.icons.outlined.ForwardToInbox
import androidx.compose.material.icons.outlined.Password
import androidx.compose.material3.Checkbox
import androidx.compose.material3.ExperimentalMaterial3Api
@ -182,7 +182,7 @@ private fun GeneratorHistoryItem(
val icon = when (type) {
GeneratorHistoryItem.Value.Type.USERNAME -> Icons.Outlined.AlternateEmail
GeneratorHistoryItem.Value.Type.EMAIL -> Icons.Outlined.Email
GeneratorHistoryItem.Value.Type.EMAIL_RELAY -> Icons.Outlined.ForwardToInbox
GeneratorHistoryItem.Value.Type.EMAIL_RELAY -> Icons.AutoMirrored.Outlined.ForwardToInbox
GeneratorHistoryItem.Value.Type.PASSWORD -> Icons.Outlined.Password
null -> Icons.Stub
}

View File

@ -14,9 +14,9 @@ import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation.lazy.items
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.HelpOutline
import androidx.compose.material.icons.outlined.Add
import androidx.compose.material.icons.outlined.Book
import androidx.compose.material.icons.outlined.HelpOutline
import androidx.compose.material3.Checkbox
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.ExperimentalMaterial3Api
@ -143,7 +143,7 @@ fun WordlistListScreen(
},
) {
Icon(
imageVector = Icons.Outlined.HelpOutline,
imageVector = Icons.AutoMirrored.Outlined.HelpOutline,
contentDescription = null,
)
}

View File

@ -187,7 +187,7 @@ fun produceWordlistListState(
.map { raw ->
val onClick = if (raw.selecting) {
// lambda
selectionHandle::toggleSelection.partially1(it.id.orEmpty())
selectionHandle::toggleSelection.partially1(it.id)
} else {
null
}
@ -195,7 +195,7 @@ fun produceWordlistListState(
null
} else {
// lambda
selectionHandle::toggleSelection.partially1(it.id.orEmpty())
selectionHandle::toggleSelection.partially1(it.id)
}
SelectableItemState(
selecting = raw.selecting,

View File

@ -12,7 +12,6 @@ import androidx.compose.foundation.lazy.items
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Add
import androidx.compose.material.icons.outlined.Book
import androidx.compose.material.icons.outlined.HelpOutline
import androidx.compose.material.icons.outlined.OpenInBrowser
import androidx.compose.material.pullrefresh.pullRefresh
import androidx.compose.material.pullrefresh.rememberPullRefreshState

View File

@ -31,10 +31,11 @@ import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.selection.selectableGroup
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.Send
import androidx.compose.material.icons.automirrored.outlined.Send
import androidx.compose.material.icons.filled.Home
import androidx.compose.material.icons.filled.Password
import androidx.compose.material.icons.filled.Security
import androidx.compose.material.icons.filled.Send
import androidx.compose.material.icons.filled.Settings
import androidx.compose.material.icons.outlined.CheckCircle
import androidx.compose.material.icons.outlined.CloudUpload
@ -43,7 +44,6 @@ import androidx.compose.material.icons.outlined.Home
import androidx.compose.material.icons.outlined.Info
import androidx.compose.material.icons.outlined.Password
import androidx.compose.material.icons.outlined.Security
import androidx.compose.material.icons.outlined.Send
import androidx.compose.material.icons.outlined.Settings
import androidx.compose.material3.BadgedBox
import androidx.compose.material3.Icon
@ -189,8 +189,8 @@ fun HomeScreen(
Rail(
key = "sends",
route = sendsRoute,
icon = Icons.Outlined.Send,
iconSelected = Icons.Filled.Send,
icon = Icons.AutoMirrored.Outlined.Send,
iconSelected = Icons.AutoMirrored.Filled.Send,
label = TextHolder.Res(Res.string.home_send_label),
),
Rail(

View File

@ -1,7 +1,7 @@
package com.artemchep.keyguard.feature.home.settings.accounts
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Logout
import androidx.compose.material.icons.automirrored.outlined.Logout
import androidx.compose.runtime.Composable
import androidx.compose.ui.text.AnnotatedString
import arrow.core.partially1
@ -142,7 +142,7 @@ fun accountListScreenState(
accountIds: Set<AccountId>,
) {
val intent = createConfirmationDialogIntent(
icon = icon(Icons.Outlined.Logout),
icon = icon(Icons.AutoMirrored.Outlined.Logout),
title = translate(Res.string.account_log_out_confirmation_title),
message = translate(Res.string.account_log_out_confirmation_text),
) {
@ -195,7 +195,7 @@ fun accountListScreenState(
}
section {
this += FlatItemAction(
icon = Icons.Outlined.Logout,
icon = Icons.AutoMirrored.Outlined.Logout,
title = Res.string.account_action_log_out_title.wrap(),
onClick = onClick {
onDelete(f)

View File

@ -26,7 +26,7 @@ fun settingAboutAppBuildRefProvider(
getAppBuildRef: GetAppBuildRef,
): SettingComponent = getAppBuildRef()
.map { buildRef ->
if (buildRef.isNullOrBlank()) {
if (buildRef.isBlank()) {
return@map null
}

View File

@ -2,7 +2,7 @@ package com.artemchep.keyguard.feature.home.settings.component
import androidx.compose.foundation.layout.RowScope
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Message
import androidx.compose.material.icons.automirrored.outlined.Message
import androidx.compose.runtime.Composable
import com.artemchep.keyguard.common.model.ToastMessage
import com.artemchep.keyguard.common.usecase.ShowMessage
@ -45,7 +45,7 @@ fun SettingEmitMessage(
onClick: () -> Unit,
) {
VaultViewButtonItem(
leading = icon<RowScope>(Icons.Outlined.Message),
leading = icon<RowScope>(Icons.AutoMirrored.Outlined.Message),
text = "Emit message",
onClick = onClick,
)

View File

@ -2,7 +2,7 @@ package com.artemchep.keyguard.feature.home.settings.component
import androidx.compose.foundation.layout.RowScope
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Label
import androidx.compose.material.icons.automirrored.outlined.Label
import androidx.compose.material3.LocalMinimumInteractiveComponentEnforcement
import androidx.compose.material3.Switch
import androidx.compose.material3.Text
@ -63,7 +63,7 @@ private fun SettingNavLabel(
onCheckedChange: ((Boolean) -> Unit)?,
) {
FlatItem(
leading = icon<RowScope>(Icons.Outlined.Label),
leading = icon<RowScope>(Icons.AutoMirrored.Outlined.Label),
trailing = {
CompositionLocalProvider(
LocalMinimumInteractiveComponentEnforcement provides false,

View File

@ -2,7 +2,7 @@ package com.artemchep.keyguard.feature.home.settings.component
import androidx.compose.foundation.layout.RowScope
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.TextSnippet
import androidx.compose.material.icons.automirrored.outlined.TextSnippet
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
@ -51,7 +51,7 @@ private fun SettingOpenSourceLicenses(
onClick: (() -> Unit)?,
) {
FlatItem(
leading = icon<RowScope>(Icons.Outlined.TextSnippet),
leading = icon<RowScope>(Icons.AutoMirrored.Outlined.TextSnippet),
trailing = {
ChevronIcon()
},

View File

@ -354,7 +354,7 @@ private fun RowScope.VaultViewTotpRemainderBadgeContent(
else -> {
CircularProgressIndicator(
modifier = circularProgressModifier,
progress = progress,
progress = { progress },
color = LocalContentColor.current,
)
Spacer(Modifier.width(4.dp))

View File

@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.Launch
import androidx.compose.material.icons.outlined.Android
import androidx.compose.material.icons.outlined.AutoAwesome
import androidx.compose.material.icons.outlined.Call
@ -17,7 +18,6 @@ import androidx.compose.material.icons.outlined.Directions
import androidx.compose.material.icons.outlined.Email
import androidx.compose.material.icons.outlined.ErrorOutline
import androidx.compose.material.icons.outlined.Key
import androidx.compose.material.icons.outlined.Launch
import androidx.compose.material.icons.outlined.Link
import androidx.compose.material.icons.outlined.Password
import androidx.compose.material.icons.outlined.PhoneIphone
@ -2308,7 +2308,7 @@ private suspend fun RememberStateFlowScope.createUriItemContextItems(
},
)
this += FlatItemAction(
icon = Icons.Outlined.Launch,
icon = Icons.AutoMirrored.Outlined.Launch,
title = Res.string.uri_action_launch_play_store_title.wrap(),
trailing = {
ChevronIcon()
@ -2347,7 +2347,7 @@ private suspend fun RememberStateFlowScope.createUriItemContextItems(
}
section {
this += FlatItemAction(
icon = Icons.Outlined.Launch,
icon = Icons.AutoMirrored.Outlined.Launch,
title = Res.string.uri_action_launch_play_store_title.wrap(),
trailing = {
ChevronIcon()
@ -2412,7 +2412,7 @@ private suspend fun RememberStateFlowScope.createUriItemContextItems(
}
section {
this += FlatItemAction(
icon = Icons.Outlined.Launch,
icon = Icons.AutoMirrored.Outlined.Launch,
title = Res.string.uri_action_launch_browser_title.wrap(),
text = TextHolder.Value(url),
trailing = {
@ -2429,7 +2429,7 @@ private suspend fun RememberStateFlowScope.createUriItemContextItems(
) {
val launchUrl = platformMarker.frontPageUrl.toString()
this += FlatItemAction(
icon = Icons.Outlined.Launch,
icon = Icons.AutoMirrored.Outlined.Launch,
title = Res.string.uri_action_launch_browser_main_page_title.wrap(),
text = TextHolder.Value(launchUrl),
trailing = {
@ -2525,7 +2525,7 @@ private suspend fun RememberStateFlowScope.createUriItemContextItems(
if (canLuanch != null) {
if (canLuanch.apps.size > 1) {
this += FlatItemAction(
icon = Icons.Outlined.Launch,
icon = Icons.AutoMirrored.Outlined.Launch,
title = Res.string.uri_action_launch_in_smth_title.wrap(),
trailing = {
ChevronIcon()
@ -2548,7 +2548,7 @@ private suspend fun RememberStateFlowScope.createUriItemContextItems(
contentDescription = null,
)
} else {
Icon(Icons.Outlined.Launch, null)
Icon(Icons.AutoMirrored.Outlined.Launch, null)
}
},
title = translate(

View File

@ -9,7 +9,7 @@ import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.slideInHorizontally
import androidx.compose.animation.slideOutHorizontally
import androidx.compose.animation.with
import androidx.compose.animation.togetherWith
import com.artemchep.keyguard.common.model.NavAnimation
const val ahForward = 300
@ -77,14 +77,14 @@ fun NavigationAnimation.transform(
fun NavigationAnimation.transformImmediate(): ContentTransform =
fadeIn(
animationSpec = snap(),
) with fadeOut(
) togetherWith fadeOut(
animationSpec = snap(),
)
fun NavigationAnimation.transformSwitchContext(scale: Float): ContentTransform =
fadeIn(
animationSpec = tween(ahForward.times(scale).toInt()),
) with fadeOut(
) togetherWith fadeOut(
animationSpec = tween(ahForward.times(scale).toInt()),
)
@ -94,7 +94,7 @@ fun NavigationAnimation.transformGoForward(scale: Float): ContentTransform =
initialOffsetX = { fullWidth -> fullWidth / 8 },
) + fadeIn(
animationSpec = twaat(ahBack.times(scale).toInt()),
) with slideOutHorizontally(
) togetherWith slideOutHorizontally(
animationSpec = twuut(ahForward.times(scale).toInt()),
targetOffsetX = { fullWidth -> -fullWidth / 12 },
) + fadeOut(
@ -107,7 +107,7 @@ fun NavigationAnimation.transformGoBack(scale: Float): ContentTransform =
initialOffsetX = { fullWidth -> -fullWidth / 12 },
) + fadeIn(
animationSpec = twaat(ahBack.times(scale).toInt()),
) with slideOutHorizontally(
) togetherWith slideOutHorizontally(
animationSpec = twuut(ahBack.times(scale).toInt()),
targetOffsetX = { fullWidth -> fullWidth / 8 },
) + fadeOut(

View File

@ -1,7 +1,7 @@
package com.artemchep.keyguard.feature.navigation
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.ArrowBack
import androidx.compose.material.icons.automirrored.outlined.ArrowBack
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.runtime.Composable
@ -25,7 +25,7 @@ fun NavigationIcon(
controller.queue(intent)
},
) {
Icon(Icons.Outlined.ArrowBack, null)
Icon(Icons.AutoMirrored.Outlined.ArrowBack, null)
}
}
}

View File

@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.widthIn
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.ShortText
import androidx.compose.material.icons.outlined.AccountBox
import androidx.compose.material.icons.outlined.CopyAll
import androidx.compose.material.icons.outlined.DataArray
@ -23,7 +24,6 @@ import androidx.compose.material.icons.outlined.QrCode
import androidx.compose.material.icons.outlined.Recycling
import androidx.compose.material.icons.outlined.Search
import androidx.compose.material.icons.outlined.SelectAll
import androidx.compose.material.icons.outlined.ShortText
import androidx.compose.material.icons.outlined.Sync
import androidx.compose.material.icons.outlined.Timer
import androidx.compose.material3.ExperimentalMaterial3Api
@ -137,7 +137,7 @@ val onboardingItemsWatchtower = listOf(
OnboardingItem(
title = Res.string.feat_item_incomplete_items_title,
text = Res.string.feat_item_incomplete_items_text,
icon = Icons.Outlined.ShortText,
icon = Icons.AutoMirrored.Outlined.ShortText,
),
OnboardingItem(
title = Res.string.feat_item_expiring_items_title,

View File

@ -1,7 +1,7 @@
package com.artemchep.keyguard.feature.passwordleak
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.FactCheck
import androidx.compose.material.icons.automirrored.outlined.FactCheck
import androidx.compose.runtime.Composable
import com.artemchep.keyguard.feature.localization.wrap
import com.artemchep.keyguard.feature.navigation.DialogRoute
@ -31,7 +31,7 @@ data class PasswordLeakRoute(
password: String,
navigate: (NavigationIntent) -> Unit,
) = FlatItemAction(
leading = icon(Icons.Outlined.FactCheck),
leading = icon(Icons.AutoMirrored.Outlined.FactCheck),
title = Res.string.password_action_check_data_breach_title.wrap(),
onClick = {
val route = PasswordLeakRoute(

View File

@ -7,7 +7,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.FactCheck
import androidx.compose.material.icons.automirrored.outlined.FactCheck
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
@ -45,7 +45,7 @@ fun PasswordLeakScreen(
args = args,
)
Dialog(
icon = icon(Icons.Outlined.FactCheck),
icon = icon(Icons.AutoMirrored.Outlined.FactCheck),
title = {
Text(stringResource(Res.string.passwordleak_title))
},

View File

@ -201,8 +201,6 @@ fun produceSendAddScreenState(
val typeFlow = kotlin.run {
val initialValue = args.type
// this should never happen
?: DSend.Type.None
flowOf(initialValue)
}
val typeItemsFlow = typeFlow

View File

@ -4,9 +4,8 @@ import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.Launch
import androidx.compose.material.icons.outlined.Email
import androidx.compose.material.icons.outlined.Launch
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
@ -634,7 +633,7 @@ private suspend fun RememberStateFlowScope.aaaa(
}
section {
this += FlatItemAction(
icon = Icons.Outlined.Launch,
icon = Icons.AutoMirrored.Outlined.Launch,
title = Res.string.uri_action_launch_browser_title.wrap(),
text = TextHolder.Value(url),
trailing = {

View File

@ -14,7 +14,7 @@ import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.OpenInNew
import androidx.compose.material.icons.automirrored.outlined.OpenInNew
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
@ -313,7 +313,7 @@ fun FlatLaunchBrowserItem(
val updatedNavigationController by rememberUpdatedState(LocalNavigationController.current)
FlatItem(
modifier = modifier,
leading = icon<RowScope>(Icons.Outlined.OpenInNew),
leading = icon<RowScope>(Icons.AutoMirrored.Outlined.OpenInNew),
title = {
Text(
text = title,

View File

@ -12,8 +12,8 @@ import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation.lazy.items
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.HelpOutline
import androidx.compose.material.icons.outlined.Add
import androidx.compose.material.icons.outlined.HelpOutline
import androidx.compose.material.icons.outlined.Search
import androidx.compose.material.icons.outlined.Terminal
import androidx.compose.material3.Checkbox
@ -128,7 +128,7 @@ fun EmailRelayListScreen(
},
) {
Icon(
imageVector = Icons.Outlined.HelpOutline,
imageVector = Icons.AutoMirrored.Outlined.HelpOutline,
contentDescription = null,
)
}

View File

@ -1,7 +1,7 @@
package com.artemchep.keyguard.feature.websiteleak
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.FactCheck
import androidx.compose.material.icons.automirrored.outlined.FactCheck
import androidx.compose.runtime.Composable
import com.artemchep.keyguard.feature.localization.wrap
import com.artemchep.keyguard.feature.navigation.DialogRoute
@ -31,7 +31,7 @@ data class WebsiteLeakRoute(
host: String,
navigate: (NavigationIntent) -> Unit,
) = FlatItemAction(
leading = icon(Icons.Outlined.FactCheck),
leading = icon(Icons.AutoMirrored.Outlined.FactCheck),
title = Res.string.website_action_check_data_breach_title.wrap(),
onClick = {
val route = WebsiteLeakRoute(

View File

@ -14,7 +14,7 @@ import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.FactCheck
import androidx.compose.material.icons.automirrored.outlined.FactCheck
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ProvideTextStyle
@ -62,7 +62,7 @@ fun WebsiteLeakScreen(
args = args,
)
Dialog(
icon = icon(Icons.Outlined.FactCheck),
icon = icon(Icons.AutoMirrored.Outlined.FactCheck),
title = {
Text(stringResource(Res.string.emailleak_title))
},

View File

@ -27,7 +27,7 @@ class CipherDuplicatesCheckImpl(
private val logRepository: LogRepository,
) : CipherDuplicatesCheck {
companion object {
private val TAG = "CipherDuplicatesCheck"
private const val TAG = "CipherDuplicatesCheck"
private val REGEX_SYMBOLS = "\\W".toRegex()
private val REGEX_DIGITS = "\\d".toRegex()

View File

@ -1,6 +1,10 @@
package com.artemchep.keyguard.ui.icons
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.LibraryBooks
import androidx.compose.material.icons.automirrored.outlined.List
import androidx.compose.material.icons.automirrored.outlined.ShortText
import androidx.compose.material.icons.automirrored.outlined.StickyNote2
import androidx.compose.material.icons.materialIcon
import androidx.compose.material.icons.materialPath
import androidx.compose.material.icons.outlined.AccountTree
@ -14,16 +18,12 @@ import androidx.compose.material.icons.outlined.ErrorOutline
import androidx.compose.material.icons.outlined.FilterList
import androidx.compose.material.icons.outlined.Key
import androidx.compose.material.icons.outlined.Lens
import androidx.compose.material.icons.outlined.LibraryBooks
import androidx.compose.material.icons.outlined.List
import androidx.compose.material.icons.outlined.Lock
import androidx.compose.material.icons.outlined.NotificationsOff
import androidx.compose.material.icons.outlined.Numbers
import androidx.compose.material.icons.outlined.Recycling
import androidx.compose.material.icons.outlined.ShortText
import androidx.compose.material.icons.outlined.Star
import androidx.compose.material.icons.outlined.StarBorder
import androidx.compose.material.icons.outlined.StickyNote2
import androidx.compose.material.icons.outlined.Timer
import androidx.compose.ui.graphics.vector.ImageVector
import compose.icons.FeatherIcons
@ -43,7 +43,7 @@ val Icons.Outlined.KeyguardPasskey
get() = Key
val Icons.Outlined.KeyguardNote
get() = StickyNote2
get() = Icons.AutoMirrored.Outlined.StickyNote2
val Icons.Outlined.KeyguardAttachment
get() = Attachment
@ -61,7 +61,7 @@ val Icons.Outlined.KeyguardCollection
get() = CollectionsBookmark
val Icons.Outlined.KeyguardCipher
get() = List
get() = Icons.AutoMirrored.Outlined.List
val Icons.Outlined.KeyguardLargeType
get() = Lens
@ -70,7 +70,7 @@ val Icons.Outlined.KeyguardPremium
get() = Star
val Icons.Outlined.KeyguardWordlist
get() = LibraryBooks
get() = Icons.AutoMirrored.Outlined.LibraryBooks
val Icons.Outlined.KeyguardCipherFilter
get() = FilterList
@ -94,7 +94,7 @@ val Icons.Outlined.KeyguardDuplicateItems
get() = CopyAll
val Icons.Outlined.KeyguardIncompleteItems
get() = ShortText
get() = Icons.AutoMirrored.Outlined.ShortText
val Icons.Outlined.KeyguardExpiringItems
get() = Timer

View File

@ -13,8 +13,8 @@ import androidx.compose.foundation.layout.only
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.ViewList
import androidx.compose.material.icons.outlined.Clear
import androidx.compose.material.icons.outlined.ViewList
import androidx.compose.material3.Button
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
@ -70,7 +70,7 @@ fun SelectionBar(
onClick = { /*TODO*/ },
) {
IconBox(
main = Icons.Outlined.ViewList,
main = Icons.AutoMirrored.Outlined.ViewList,
secondary = null, // Icons.Outlined.PanoramaFishEye,
)
if (title != null) {

View File

@ -62,7 +62,7 @@ fun CustomToolbar(
Modifier.draggable(
orientation = Orientation.Vertical,
state = rememberDraggableState { delta ->
scrollBehavior.state.heightOffset = scrollBehavior.state.heightOffset + delta
scrollBehavior.state.heightOffset += delta
},
onDragStopped = { velocity ->
settleAppBar(