Replace " - " by " • " as it renders better.
This commit is contained in:
parent
8c86dfb765
commit
f19ceb1570
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.designsystem.theme.components.Text
|
||||||
import io.element.android.libraries.matrix.api.verification.SessionVerificationData
|
import io.element.android.libraries.matrix.api.verification.SessionVerificationData
|
||||||
import io.element.android.libraries.matrix.api.verification.VerificationEmoji
|
import io.element.android.libraries.matrix.api.verification.VerificationEmoji
|
||||||
|
import io.element.android.libraries.ui.strings.Strings
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
internal fun VerificationContentVerifying(
|
internal fun VerificationContentVerifying(
|
||||||
|
|
@ -49,7 +50,7 @@ internal fun VerificationContentVerifying(
|
||||||
) {
|
) {
|
||||||
when (data) {
|
when (data) {
|
||||||
is SessionVerificationData.Decimals -> {
|
is SessionVerificationData.Decimals -> {
|
||||||
val text = data.decimals.joinToString(separator = " - ")
|
val text = data.decimals.joinToString(separator = Strings.NICE_SEPARATOR)
|
||||||
Text(
|
Text(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.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.matrix.ui.media.MediaRequestData
|
||||||
import io.element.android.libraries.mediaviewer.impl.R
|
import io.element.android.libraries.mediaviewer.impl.R
|
||||||
import io.element.android.libraries.ui.strings.CommonStrings
|
import io.element.android.libraries.ui.strings.CommonStrings
|
||||||
|
import io.element.android.libraries.ui.strings.Strings
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
|
|
@ -149,7 +150,7 @@ private fun MediaRow(
|
||||||
)
|
)
|
||||||
// Info
|
// Info
|
||||||
Text(
|
Text(
|
||||||
text = state.mediaInfo.mimeType + " - " + state.mediaInfo.formattedFileSize,
|
text = state.mediaInfo.mimeType + Strings.NICE_SEPARATOR + state.mediaInfo.formattedFileSize,
|
||||||
color = ElementTheme.colors.textSecondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
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.api.MediaInfo
|
||||||
import io.element.android.libraries.mediaviewer.impl.R
|
import io.element.android.libraries.mediaviewer.impl.R
|
||||||
import io.element.android.libraries.ui.strings.CommonStrings
|
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
|
* Ref: https://www.figma.com/design/pDlJZGBsri47FNTXMnEdXB/Compound-Android-Templates?node-id=2229-149220
|
||||||
|
|
@ -93,7 +94,7 @@ fun MediaDetailsBottomSheet(
|
||||||
)
|
)
|
||||||
SectionText(
|
SectionText(
|
||||||
title = stringResource(R.string.screen_media_details_file_format),
|
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))
|
Spacer(modifier = Modifier.height(16.dp))
|
||||||
if (state.eventId != null) {
|
if (state.eventId != null) {
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
package io.element.android.libraries.mediaviewer.impl.local.audio
|
package io.element.android.libraries.mediaviewer.impl.local.audio
|
||||||
|
|
||||||
import androidx.media3.common.MediaMetadata
|
import androidx.media3.common.MediaMetadata
|
||||||
|
import io.element.android.libraries.ui.strings.Strings
|
||||||
|
|
||||||
fun MediaMetadata?.hasArtwork(): Boolean {
|
fun MediaMetadata?.hasArtwork(): Boolean {
|
||||||
return this?.artworkData != null || this?.artworkUri != null
|
return this?.artworkData != null || this?.artworkUri != null
|
||||||
|
|
@ -22,13 +23,13 @@ fun MediaMetadata?.buildInfo(): String {
|
||||||
}
|
}
|
||||||
if (title != null) {
|
if (title != null) {
|
||||||
if (isNotEmpty()) {
|
if (isNotEmpty()) {
|
||||||
append(" - ")
|
append(Strings.NICE_SEPARATOR)
|
||||||
}
|
}
|
||||||
append(title)
|
append(title)
|
||||||
}
|
}
|
||||||
if (recordingYear != null) {
|
if (recordingYear != null) {
|
||||||
if (isNotEmpty()) {
|
if (isNotEmpty()) {
|
||||||
append(" - ")
|
append(Strings.NICE_SEPARATOR)
|
||||||
}
|
}
|
||||||
append(recordingYear)
|
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