Replace " - " by " • " as it renders better.
This commit is contained in:
parent
e37083669e
commit
1c229e7229
5 changed files with 21 additions and 5 deletions
|
|
@ -35,6 +35,7 @@ import io.element.android.features.verifysession.impl.emoji.toEmojiResource
|
|||
import io.element.android.libraries.designsystem.theme.components.Text
|
||||
import io.element.android.libraries.matrix.api.verification.SessionVerificationData
|
||||
import io.element.android.libraries.matrix.api.verification.VerificationEmoji
|
||||
import io.element.android.libraries.ui.strings.Strings
|
||||
|
||||
@Composable
|
||||
internal fun VerificationContentVerifying(
|
||||
|
|
@ -49,7 +50,7 @@ internal fun VerificationContentVerifying(
|
|||
) {
|
||||
when (data) {
|
||||
is SessionVerificationData.Decimals -> {
|
||||
val text = data.decimals.joinToString(separator = " - ")
|
||||
val text = data.decimals.joinToString(separator = Strings.NICE_SEPARATOR)
|
||||
Text(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ import io.element.android.libraries.matrix.api.core.EventId
|
|||
import io.element.android.libraries.matrix.ui.media.MediaRequestData
|
||||
import io.element.android.libraries.mediaviewer.impl.R
|
||||
import io.element.android.libraries.ui.strings.CommonStrings
|
||||
import io.element.android.libraries.ui.strings.Strings
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
|
|
@ -149,7 +150,7 @@ private fun MediaRow(
|
|||
)
|
||||
// Info
|
||||
Text(
|
||||
text = state.mediaInfo.mimeType + " - " + state.mediaInfo.formattedFileSize,
|
||||
text = state.mediaInfo.mimeType + Strings.NICE_SEPARATOR + state.mediaInfo.formattedFileSize,
|
||||
color = ElementTheme.colors.textSecondary,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ import io.element.android.libraries.matrix.api.core.EventId
|
|||
import io.element.android.libraries.mediaviewer.api.MediaInfo
|
||||
import io.element.android.libraries.mediaviewer.impl.R
|
||||
import io.element.android.libraries.ui.strings.CommonStrings
|
||||
import io.element.android.libraries.ui.strings.Strings
|
||||
|
||||
/**
|
||||
* Ref: https://www.figma.com/design/pDlJZGBsri47FNTXMnEdXB/Compound-Android-Templates?node-id=2229-149220
|
||||
|
|
@ -93,7 +94,7 @@ fun MediaDetailsBottomSheet(
|
|||
)
|
||||
SectionText(
|
||||
title = stringResource(R.string.screen_media_details_file_format),
|
||||
text = state.mediaInfo.mimeType + " - " + state.mediaInfo.formattedFileSize,
|
||||
text = state.mediaInfo.mimeType + Strings.NICE_SEPARATOR + state.mediaInfo.formattedFileSize,
|
||||
)
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
if (state.eventId != null) {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
package io.element.android.libraries.mediaviewer.impl.local.audio
|
||||
|
||||
import androidx.media3.common.MediaMetadata
|
||||
import io.element.android.libraries.ui.strings.Strings
|
||||
|
||||
fun MediaMetadata?.hasArtwork(): Boolean {
|
||||
return this?.artworkData != null || this?.artworkUri != null
|
||||
|
|
@ -22,13 +23,13 @@ fun MediaMetadata?.buildInfo(): String {
|
|||
}
|
||||
if (title != null) {
|
||||
if (isNotEmpty()) {
|
||||
append(" - ")
|
||||
append(Strings.NICE_SEPARATOR)
|
||||
}
|
||||
append(title)
|
||||
}
|
||||
if (recordingYear != null) {
|
||||
if (isNotEmpty()) {
|
||||
append(" - ")
|
||||
append(Strings.NICE_SEPARATOR)
|
||||
}
|
||||
append(recordingYear)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* Copyright (c) 2026 Element Creations Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.libraries.ui.strings
|
||||
|
||||
object Strings {
|
||||
const val NICE_SEPARATOR = " • "
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue