Update Compound to v0.0.5 and update icons (#2380)
Update Compound to `v0.0.5`: - Make sure we fix all the breaking changes. - Update some icons to use the compound version instead. -Replace icons with their Compound counterparts when possible. - Clean up unused icons. - Fix issues with incorrect icons or sizes being used after replacing the temporary icons with the Compound ones. --------- Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
parent
896bd4126e
commit
b69cb8175a
1013 changed files with 1945 additions and 3061 deletions
|
|
@ -90,7 +90,7 @@ fun ConfigureTracingView(
|
|||
onClick = { showMenu = !showMenu }
|
||||
) {
|
||||
Icon(
|
||||
imageVector = CompoundIcons.OverflowVertical,
|
||||
imageVector = CompoundIcons.OverflowVertical(),
|
||||
tint = ElementTheme.materialColors.secondary,
|
||||
contentDescription = null,
|
||||
)
|
||||
|
|
@ -107,7 +107,7 @@ fun ConfigureTracingView(
|
|||
text = { Text("Reset to default") },
|
||||
leadingIcon = {
|
||||
Icon(
|
||||
imageVector = CompoundIcons.Delete,
|
||||
imageVector = CompoundIcons.Delete(),
|
||||
tint = ElementTheme.materialColors.secondary,
|
||||
contentDescription = null,
|
||||
)
|
||||
|
|
@ -203,7 +203,7 @@ private fun LogLevelDropdownMenu(
|
|||
trailingIcon = {
|
||||
Icon(
|
||||
modifier = Modifier.rotate(if (expanded) 180f else 0f),
|
||||
imageVector = CompoundIcons.ChevronDown,
|
||||
imageVector = CompoundIcons.ChevronDown(),
|
||||
contentDescription = null,
|
||||
)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ private fun NotificationSettingsContentView(
|
|||
val context = LocalContext.current
|
||||
if (systemSettings.appNotificationsEnabled && !systemSettings.systemNotificationsEnabled) {
|
||||
PreferenceText(
|
||||
icon = CompoundIcons.NotificationsSolidOff,
|
||||
icon = CompoundIcons.NotificationsOffSolid(),
|
||||
title = stringResource(id = R.string.screen_notification_settings_system_notifications_turned_off),
|
||||
subtitle = stringResource(
|
||||
id = R.string.screen_notification_settings_system_notifications_action_required,
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@ package io.element.android.features.preferences.impl.root
|
|||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.InsertChart
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Modifier
|
||||
|
|
@ -85,14 +83,14 @@ fun PreferencesRootView(
|
|||
if (state.showCompleteVerification) {
|
||||
ListItem(
|
||||
headlineContent = { Text(text = stringResource(CommonStrings.common_verify_device)) },
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.CheckCircle)),
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.CheckCircle())),
|
||||
onClick = onVerifyClicked
|
||||
)
|
||||
}
|
||||
if (state.showSecureBackup) {
|
||||
ListItem(
|
||||
headlineContent = { Text(stringResource(id = CommonStrings.common_chat_backup)) },
|
||||
leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_key_filled)),
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.KeySolid())),
|
||||
trailingContent = ListItemContent.Badge.takeIf { state.showSecureBackupBadge },
|
||||
onClick = onSecureBackupClicked,
|
||||
)
|
||||
|
|
@ -103,8 +101,8 @@ fun PreferencesRootView(
|
|||
if (state.accountManagementUrl != null) {
|
||||
ListItem(
|
||||
headlineContent = { Text(stringResource(id = CommonStrings.action_manage_account)) },
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.UserProfile)),
|
||||
trailingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.PopOut)),
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.UserProfile())),
|
||||
trailingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.PopOut())),
|
||||
onClick = { onManageAccountClicked(state.accountManagementUrl) },
|
||||
)
|
||||
HorizontalDivider()
|
||||
|
|
@ -112,31 +110,31 @@ fun PreferencesRootView(
|
|||
if (state.showAnalyticsSettings) {
|
||||
ListItem(
|
||||
headlineContent = { Text(stringResource(id = CommonStrings.common_analytics)) },
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(Icons.Outlined.InsertChart)),
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Chart())),
|
||||
onClick = onOpenAnalytics,
|
||||
)
|
||||
}
|
||||
if (state.showNotificationSettings) {
|
||||
ListItem(
|
||||
headlineContent = { Text(stringResource(id = R.string.screen_notification_settings_title)) },
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Notifications)),
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Notifications())),
|
||||
onClick = onOpenNotificationSettings,
|
||||
)
|
||||
}
|
||||
ListItem(
|
||||
headlineContent = { Text(stringResource(id = CommonStrings.common_report_a_problem)) },
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.ChatProblem)),
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.ChatProblem())),
|
||||
onClick = onOpenRageShake
|
||||
)
|
||||
ListItem(
|
||||
headlineContent = { Text(stringResource(id = CommonStrings.common_about)) },
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Info)),
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Info())),
|
||||
onClick = onOpenAbout,
|
||||
)
|
||||
if (state.showLockScreenSettings) {
|
||||
ListItem(
|
||||
headlineContent = { Text(stringResource(id = CommonStrings.common_screen_lock)) },
|
||||
leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_lock_outline)),
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Lock())),
|
||||
onClick = onOpenLockScreenSettings,
|
||||
)
|
||||
}
|
||||
|
|
@ -144,15 +142,15 @@ fun PreferencesRootView(
|
|||
if (state.devicesManagementUrl != null) {
|
||||
ListItem(
|
||||
headlineContent = { Text(stringResource(id = CommonStrings.action_manage_devices)) },
|
||||
leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_devices)),
|
||||
trailingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.PopOut)),
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Devices())),
|
||||
trailingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.PopOut())),
|
||||
onClick = { onManageAccountClicked(state.devicesManagementUrl) },
|
||||
)
|
||||
HorizontalDivider()
|
||||
}
|
||||
ListItem(
|
||||
headlineContent = { Text(stringResource(id = CommonStrings.common_advanced_settings)) },
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Settings)),
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Settings())),
|
||||
onClick = onOpenAdvancedSettings,
|
||||
)
|
||||
if (state.showDeveloperSettings) {
|
||||
|
|
@ -161,7 +159,7 @@ fun PreferencesRootView(
|
|||
HorizontalDivider()
|
||||
ListItem(
|
||||
headlineContent = { Text(stringResource(id = CommonStrings.action_signout)) },
|
||||
leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_sign_out)),
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.SignOut())),
|
||||
style = ListItemStyle.Destructive,
|
||||
onClick = onSignOutClicked,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue