From 896cf866b38aac2559ec444c22dc79efe8d7b49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCrten?= <sebastian@mobanisto.de> Date: Wed, 12 Feb 2025 13:44:44 +0100 Subject: [PATCH] Fix new warnings (deprecated logging and icons usage) * Some calls to the logging API were still not using the lambda API * Some icons we use have been deprecated, fortunately, Android Studio can suggest a replacement --- .../androidx/compose/material/OutlinedTextFieldExt.kt | 7 ++----- .../kotlin/androidx/compose/material/TextFieldExt.kt | 7 ++----- .../main/kotlin/org/briarproject/briar/desktop/Main.kt | 2 -- .../org/briarproject/briar/desktop/blog/BlogInput.kt | 6 ++---- .../org/briarproject/briar/desktop/blog/BlogScreen.kt | 4 ++-- .../briarproject/briar/desktop/blog/FeedViewModel.kt | 4 ++-- .../org/briarproject/briar/desktop/blog/HtmlText.kt | 3 +-- .../briar/desktop/contact/ContactDropDown.kt | 10 +++++----- .../desktop/contact/add/remote/AddContactDialog.kt | 4 ---- .../briar/desktop/conversation/ConversationInput.kt | 6 ++---- .../briarproject/briar/desktop/login/ErrorScreen.kt | 6 +++--- .../briarproject/briar/desktop/login/StartupScreen.kt | 6 +++--- .../conversation/ThreadedGroupConversationInput.kt | 6 ++---- .../org/briarproject/briar/desktop/ui/AboutScreen.kt | 4 ++-- .../briarproject/briar/desktop/ui/ColoredIconButton.kt | 3 --- .../kotlin/org/briarproject/briar/desktop/ui/UiMode.kt | 4 ++-- .../briar/desktop/RunWithTemporaryAccount.kt | 2 -- .../kotlin/org/briarproject/briar/desktop/TestUtils.kt | 2 +- 18 files changed, 31 insertions(+), 55 deletions(-) diff --git a/briar-desktop/src/main/kotlin/androidx/compose/material/OutlinedTextFieldExt.kt b/briar-desktop/src/main/kotlin/androidx/compose/material/OutlinedTextFieldExt.kt index bdcf409825..732ad8235a 100644 --- a/briar-desktop/src/main/kotlin/androidx/compose/material/OutlinedTextFieldExt.kt +++ b/briar-desktop/src/main/kotlin/androidx/compose/material/OutlinedTextFieldExt.kt @@ -36,7 +36,6 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.focus.onFocusEvent import androidx.compose.ui.graphics.Shape @@ -63,7 +62,6 @@ import org.briarproject.briar.desktop.utils.InternationalizationUtils.i18n * @param errorMessage Message to be shown beneath the text field in case of error * @param showErrorWhen Show error only if the given focus state has been passed, even if [isError] is true */ -@OptIn(ExperimentalComposeUiApi::class) @Composable fun OutlinedTextField( value: String, @@ -88,7 +86,7 @@ fun OutlinedTextField( maxLines: Int = Int.MAX_VALUE, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, shape: Shape = MaterialTheme.shapes.small, - colors: TextFieldColors = TextFieldDefaults.outlinedTextFieldColors() + colors: TextFieldColors = TextFieldDefaults.outlinedTextFieldColors(), ) { var initialFocusState by remember { mutableStateOf(FROM_START) } val showError by derivedStateOf { isError && initialFocusState >= showErrorWhen } @@ -156,7 +154,6 @@ enum class InitialFocusState { FROM_START, AFTER_FIRST_FOCUSSED, AFTER_FOCUS_LOS * * @param visualTransformation Visual transformation is only applied when password is hidden */ -@OptIn(ExperimentalComposeUiApi::class) @Composable fun OutlinedPasswordTextField( value: String, @@ -179,7 +176,7 @@ fun OutlinedPasswordTextField( maxLines: Int = Int.MAX_VALUE, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, shape: Shape = MaterialTheme.shapes.small, - colors: TextFieldColors = TextFieldDefaults.outlinedTextFieldColors() + colors: TextFieldColors = TextFieldDefaults.outlinedTextFieldColors(), ) { var isPasswordVisible by remember { mutableStateOf(false) } diff --git a/briar-desktop/src/main/kotlin/androidx/compose/material/TextFieldExt.kt b/briar-desktop/src/main/kotlin/androidx/compose/material/TextFieldExt.kt index 6c06bb0807..77a5efa035 100644 --- a/briar-desktop/src/main/kotlin/androidx/compose/material/TextFieldExt.kt +++ b/briar-desktop/src/main/kotlin/androidx/compose/material/TextFieldExt.kt @@ -27,7 +27,6 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.focus.FocusDirection import androidx.compose.ui.focus.FocusManager @@ -49,7 +48,6 @@ import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.text.input.TextFieldValue import androidx.compose.ui.text.input.VisualTransformation -@OptIn(ExperimentalComposeUiApi::class) @Composable fun TextField( value: String, @@ -70,7 +68,7 @@ fun TextField( interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, shape: Shape = MaterialTheme.shapes.small.copy(bottomEnd = ZeroCornerSize, bottomStart = ZeroCornerSize), - colors: TextFieldColors = TextFieldDefaults.textFieldColors() + colors: TextFieldColors = TextFieldDefaults.textFieldColors(), ) { var textFieldValueState by remember { mutableStateOf(TextFieldValue(text = value)) } val textFieldValue = textFieldValueState.copy(text = value) @@ -128,10 +126,9 @@ object TextFieldExt { // tab navigation for multi-line TextField is broken upstream // see https://github.com/JetBrains/compose-jb/issues/109 - @OptIn(ExperimentalComposeUiApi::class) @Composable fun Modifier.moveFocusOnTab( - focusManager: FocusManager = LocalFocusManager.current + focusManager: FocusManager = LocalFocusManager.current, ) = onPreviewKeyEvent { if (it.type == KeyEventType.KeyDown && it.key == Key.Tab) { focusManager.moveFocus( diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/Main.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/Main.kt index 3bcbb3c015..f63ad6751f 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/Main.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/Main.kt @@ -18,7 +18,6 @@ package org.briarproject.briar.desktop -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.window.application import com.github.ajalt.clikt.core.CliktCommand import com.github.ajalt.clikt.core.Context @@ -95,7 +94,6 @@ private class Main : CliktCommand( help = i18n("main.help.tor.port.control") ).int().default(DEFAULT_CONTROL_PORT) - @OptIn(ExperimentalComposeUiApi::class) override fun run() { val level = if (debug) ALL else when (verbosity) { 0 -> WARNING diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/BlogInput.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/BlogInput.kt index be9f8a3b4e..9b36938adf 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/BlogInput.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/BlogInput.kt @@ -32,13 +32,12 @@ import androidx.compose.material.TextField import androidx.compose.material.TextFieldDefaults import androidx.compose.material.TextFieldExt.moveFocusOnTab import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.automirrored.filled.Send import androidx.compose.material.icons.filled.Close -import androidx.compose.material.icons.filled.Send import androidx.compose.runtime.Composable import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.ui.Alignment.Companion.Top -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.input.pointer.PointerIcon import androidx.compose.ui.input.pointer.pointerHoverIcon @@ -53,7 +52,6 @@ import org.briarproject.briar.desktop.utils.InternationalizationUtils.i18n import org.briarproject.briar.desktop.utils.StringUtils.takeUtf8 @Composable -@OptIn(ExperimentalComposeUiApi::class) fun BlogInput( selectedBlogPost: BlogPost?, onReplyClosed: () -> Unit, @@ -125,7 +123,7 @@ fun BlogInput( ), trailingIcon = { IconButton( - icon = Icons.Filled.Send, + icon = Icons.AutoMirrored.Filled.Send, iconTint = MaterialTheme.colors.sendButton, contentDescription = i18n("access.message.send"), onClick = onSendAction, diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/BlogScreen.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/BlogScreen.kt index 1596138b3d..15236dc304 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/BlogScreen.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/BlogScreen.kt @@ -35,7 +35,7 @@ import androidx.compose.material.MaterialTheme import androidx.compose.material.Scaffold import androidx.compose.material.Text import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowBack +import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material.icons.filled.MoreVert import androidx.compose.material.icons.filled.Share import androidx.compose.runtime.Composable @@ -138,7 +138,7 @@ private fun BlogHeader( verticalAlignment = CenterVertically, ) { IconButton( - icon = Icons.Filled.ArrowBack, + icon = Icons.AutoMirrored.Filled.ArrowBack, contentDescription = i18n("blog.back"), onClick = onBackClick, ) diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/FeedViewModel.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/FeedViewModel.kt index d118d4b2db..8471b105e2 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/FeedViewModel.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/FeedViewModel.kt @@ -102,10 +102,10 @@ class FeedViewModel @Inject constructor( @Suppress("HardCodedStringLiteral") override fun eventOccurred(e: Event) { if (e is BlogPostAddedEvent) { - LOG.info("Blog post added") + LOG.info { "Blog post added" } onBlogPostAdded(e.header, e.isLocal) } else if (e is GroupRemovedEvent && e.group.clientId == BlogManager.CLIENT_ID) { - LOG.info("Blog removed") + LOG.info { "Blog removed" } onBlogRemoved(e.group.id) } } diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/HtmlText.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/HtmlText.kt index 79c509bf8f..3532e95912 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/HtmlText.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/HtmlText.kt @@ -18,7 +18,6 @@ package org.briarproject.briar.desktop.blog -import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.text.BasicText import androidx.compose.material.MaterialTheme import androidx.compose.runtime.Composable @@ -71,7 +70,7 @@ val listBullets = listOf( "\u25aa", ) -@OptIn(ExperimentalComposeUiApi::class, ExperimentalFoundationApi::class) +@OptIn(ExperimentalComposeUiApi::class) @Composable @Suppress("HardCodedStringLiteral") fun HtmlText( diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/contact/ContactDropDown.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/contact/ContactDropDown.kt index 921faa1b32..1449735fe8 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/contact/ContactDropDown.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/contact/ContactDropDown.kt @@ -27,8 +27,8 @@ import androidx.compose.material.Icon import androidx.compose.material.MaterialTheme import androidx.compose.material.Text import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowLeft -import androidx.compose.material.icons.filled.ArrowRight +import androidx.compose.material.icons.automirrored.filled.ArrowLeft +import androidx.compose.material.icons.automirrored.filled.ArrowRight import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment.Companion.CenterVertically import androidx.compose.ui.Modifier @@ -83,7 +83,7 @@ fun ContactDropDown( modifier = Modifier.align(CenterVertically) ) Icon( - Icons.Filled.ArrowRight, + Icons.AutoMirrored.Filled.ArrowRight, i18n("access.contacts.dropdown.connections.expand"), modifier = Modifier.align(CenterVertically) ) @@ -98,7 +98,7 @@ fun ContactDropDown( modifier = Modifier.align(CenterVertically) ) Icon( - Icons.Filled.ArrowRight, + Icons.AutoMirrored.Filled.ArrowRight, i18n("access.contacts.dropdown.contacts.expand"), modifier = Modifier.align(CenterVertically) ) @@ -126,7 +126,7 @@ fun ContactDropDown( DropdownMenuItem(onClick = { setState(State.MAIN) }) { Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(8.dp)) { Icon( - Icons.Filled.ArrowLeft, + Icons.AutoMirrored.Filled.ArrowLeft, i18n("back"), modifier = Modifier.align(CenterVertically) ) diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/contact/add/remote/AddContactDialog.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/contact/add/remote/AddContactDialog.kt index 93c43e62d3..43f088af9c 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/contact/add/remote/AddContactDialog.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/contact/add/remote/AddContactDialog.kt @@ -35,7 +35,6 @@ import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material.AlertDialog import androidx.compose.material.Button import androidx.compose.material.ButtonDefaults -import androidx.compose.material.ExperimentalMaterialApi import androidx.compose.material.Icon import androidx.compose.material.IconButton import androidx.compose.material.MaterialTheme @@ -63,7 +62,6 @@ import androidx.compose.ui.Alignment.Companion.BottomCenter import androidx.compose.ui.Alignment.Companion.Center import androidx.compose.ui.Alignment.Companion.CenterEnd import androidx.compose.ui.Alignment.Companion.CenterVertically -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.focus.FocusRequester import androidx.compose.ui.focus.focusRequester @@ -275,7 +273,6 @@ private fun AddContactDialogContent( } } -@OptIn(ExperimentalMaterialApi::class) @Composable private fun AddContactErrorDialog(error: AddContactError, onErrorDialogDismissed: () -> Unit) { val (type, title, message) = errorMessage(error) @@ -367,7 +364,6 @@ private fun OwnLink( } } -@OptIn(ExperimentalComposeUiApi::class) @Composable private fun ContactLink( remoteHandshakeLink: String, diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/conversation/ConversationInput.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/conversation/ConversationInput.kt index 887b20a1e0..f56694b7c5 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/conversation/ConversationInput.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/conversation/ConversationInput.kt @@ -33,15 +33,14 @@ import androidx.compose.material.TextField import androidx.compose.material.TextFieldDefaults import androidx.compose.material.TextFieldExt.moveFocusOnTab import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.automirrored.filled.Send import androidx.compose.material.icons.filled.Add import androidx.compose.material.icons.filled.Close -import androidx.compose.material.icons.filled.Send import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.ImageBitmap import androidx.compose.ui.input.pointer.PointerIcon @@ -79,7 +78,6 @@ fun main() = preview { } } -@OptIn(ExperimentalComposeUiApi::class) @Composable fun ConversationInput( text: String, @@ -126,7 +124,7 @@ fun ConversationInput( }, trailingIcon = { IconButton( - icon = Icons.Filled.Send, + icon = Icons.AutoMirrored.Filled.Send, iconTint = MaterialTheme.colors.sendButton, contentDescription = i18n("access.message.send"), onClick = onSend, diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/login/ErrorScreen.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/login/ErrorScreen.kt index 47204c382a..a841f5cde1 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/login/ErrorScreen.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/login/ErrorScreen.kt @@ -32,7 +32,7 @@ import androidx.compose.material.IconButton import androidx.compose.material.MaterialTheme import androidx.compose.material.Text import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowBack +import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material.icons.filled.Error import androidx.compose.material.icons.filled.Info import androidx.compose.runtime.Composable @@ -78,7 +78,7 @@ fun main() = preview { @Composable fun ErrorScreen( - viewHolder: ErrorSubViewModel + viewHolder: ErrorSubViewModel, ) = ErrorScreen(viewHolder.error, viewHolder.onBackButton) @Composable @@ -135,7 +135,7 @@ fun ErrorScreen( if (onBackButton != null) { IconButton( - icon = Icons.Filled.ArrowBack, + icon = Icons.AutoMirrored.Filled.ArrowBack, contentDescription = i18n("access.return_to_previous_screen"), onClick = onBackButton ) diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/login/StartupScreen.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/login/StartupScreen.kt index 904fbe6a71..e6fc5f0c93 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/login/StartupScreen.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/login/StartupScreen.kt @@ -29,7 +29,7 @@ import androidx.compose.material.IconButton import androidx.compose.material.MaterialTheme import androidx.compose.material.Text import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowBack +import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material.icons.filled.Info import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment.Companion.BottomStart @@ -61,7 +61,7 @@ fun StartupScreenScaffold( showBackButton: Boolean = false, onBackButton: () -> Unit = {}, onShowAbout: () -> Unit = {}, - content: @Composable () -> Unit + content: @Composable () -> Unit, ) = Box { Column( modifier = Modifier.padding(16.dp).fillMaxSize(), @@ -73,7 +73,7 @@ fun StartupScreenScaffold( if (showBackButton) { IconButton( - icon = Icons.Filled.ArrowBack, + icon = Icons.AutoMirrored.Filled.ArrowBack, contentDescription = i18n("access.return_to_previous_screen"), onClick = onBackButton, modifier = Modifier.align(TopStart) diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/threadedgroup/conversation/ThreadedGroupConversationInput.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/threadedgroup/conversation/ThreadedGroupConversationInput.kt index c5eaa6c355..26a8bd3736 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/threadedgroup/conversation/ThreadedGroupConversationInput.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/threadedgroup/conversation/ThreadedGroupConversationInput.kt @@ -33,13 +33,12 @@ import androidx.compose.material.TextField import androidx.compose.material.TextFieldDefaults import androidx.compose.material.TextFieldExt.moveFocusOnTab import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.automirrored.filled.Send import androidx.compose.material.icons.filled.Close -import androidx.compose.material.icons.filled.Send import androidx.compose.runtime.Composable import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.ui.Alignment.Companion.Top -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.input.pointer.PointerIcon import androidx.compose.ui.input.pointer.pointerHoverIcon @@ -53,7 +52,6 @@ import org.briarproject.briar.desktop.utils.InternationalizationUtils.i18n import org.briarproject.briar.desktop.utils.StringUtils.takeUtf8 @Composable -@OptIn(ExperimentalComposeUiApi::class) fun ThreadedGroupConversationInput( strings: ThreadedGroupStrings, selectedThreadItem: ThreadItem?, @@ -130,7 +128,7 @@ fun ThreadedGroupConversationInput( ), trailingIcon = { IconButton( - icon = Icons.Filled.Send, + icon = Icons.AutoMirrored.Filled.Send, iconTint = MaterialTheme.colors.sendButton, contentDescription = i18n("access.message.send"), onClick = onSendAction, diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/ui/AboutScreen.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/ui/AboutScreen.kt index dc1af530e6..0ac7dac8fa 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/ui/AboutScreen.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/ui/AboutScreen.kt @@ -20,7 +20,7 @@ import androidx.compose.material.Tab import androidx.compose.material.TabRow import androidx.compose.material.Text import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowBack +import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material.icons.filled.ContentCopy import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -68,7 +68,7 @@ fun AboutScreen( AboutScreen() IconButton( - icon = Icons.Filled.ArrowBack, + icon = Icons.AutoMirrored.Filled.ArrowBack, contentDescription = i18n("access.return_to_previous_screen"), onClick = onBackButton, modifier = Modifier.align(TopStart) diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/ui/ColoredIconButton.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/ui/ColoredIconButton.kt index 6eae21b074..d704edcdcb 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/ui/ColoredIconButton.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/ui/ColoredIconButton.kt @@ -30,7 +30,6 @@ import androidx.compose.material.contentColorFor import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.remember -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.vector.ImageVector @@ -39,7 +38,6 @@ import androidx.compose.ui.input.pointer.pointerHoverIcon import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -@OptIn(ExperimentalComposeUiApi::class) @Composable fun ColoredIconButton( onClick: () -> Unit, @@ -65,7 +63,6 @@ fun ColoredIconButton( ) } -@OptIn(ExperimentalComposeUiApi::class) @Composable fun ColoredIconButton( icon: ImageVector, diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/ui/UiMode.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/ui/UiMode.kt index 34cd8796e4..11df956d36 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/ui/UiMode.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/ui/UiMode.kt @@ -19,7 +19,7 @@ package org.briarproject.briar.desktop.ui import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ChromeReaderMode +import androidx.compose.material.icons.automirrored.filled.ChromeReaderMode import androidx.compose.material.icons.filled.Contacts import androidx.compose.material.icons.filled.Forum import androidx.compose.material.icons.filled.Group @@ -33,7 +33,7 @@ enum class UiMode(val icon: ImageVector, val contentDescriptionKey: String) { CONTACTS(Icons.Filled.Contacts, "access.mode.contacts"), GROUPS(Icons.Filled.Group, "access.mode.groups"), FORUMS(Icons.Filled.Forum, "access.mode.forums"), - BLOGS(Icons.Filled.ChromeReaderMode, "access.mode.blogs"), + BLOGS(Icons.AutoMirrored.Filled.ChromeReaderMode, "access.mode.blogs"), TRANSPORTS(Icons.Filled.WifiTethering, "access.mode.transports"), MAILBOX(MailboxIcon, "access.mode.mailbox"), SETTINGS(Icons.Filled.Settings, "access.mode.settings"), diff --git a/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/RunWithTemporaryAccount.kt b/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/RunWithTemporaryAccount.kt index fc9da08c76..33da523e38 100644 --- a/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/RunWithTemporaryAccount.kt +++ b/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/RunWithTemporaryAccount.kt @@ -21,7 +21,6 @@ package org.briarproject.briar.desktop import androidx.compose.runtime.LaunchedEffect -import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.window.application import io.github.oshai.kotlinlogging.KotlinLogging import org.briarproject.bramble.BrambleCoreEagerSingletons @@ -49,7 +48,6 @@ internal class RunWithTemporaryAccount( private val LOG = KotlinLogging.logger {} } - @OptIn(ExperimentalComposeUiApi::class) fun run() { LogUtils.setupLogging(ALL) diff --git a/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/TestUtils.kt b/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/TestUtils.kt index acbe8a981d..1803bf09dc 100644 --- a/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/TestUtils.kt +++ b/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/TestUtils.kt @@ -127,7 +127,7 @@ object TestUtils { ) // Contact exchange succeeded - LOG.info("Contact exchange succeeded") + LOG.info { "Contact exchange succeeded" } } private fun addContact( -- GitLab