Merge pull request #3857 from element-hq/feature/bma/legacyCallIteration

Update the strings for unsupported calls
This commit is contained in:
Benoit Marty 2024-11-12 20:45:05 +01:00 committed by GitHub
commit 9863cbfd93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 18 additions and 21 deletions

View file

@ -7,24 +7,21 @@
package io.element.android.features.messages.impl.timeline.components.event
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.width
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import io.element.android.compound.theme.ElementTheme
import io.element.android.compound.tokens.generated.CompoundIcons
import io.element.android.features.messages.impl.R
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.theme.components.Icon
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.ui.strings.CommonStrings
@Composable
fun TimelineItemLegacyCallInviteView(
@ -32,20 +29,18 @@ fun TimelineItemLegacyCallInviteView(
) {
Row(
modifier = modifier,
horizontalArrangement = Arrangement.Center,
verticalAlignment = Alignment.CenterVertically
) {
Icon(
imageVector = CompoundIcons.VoiceCall(),
contentDescription = null,
tint = MaterialTheme.colorScheme.secondary,
tint = ElementTheme.colors.iconSecondary,
)
Spacer(modifier = Modifier.width(8.dp))
Text(
color = MaterialTheme.colorScheme.secondary,
color = ElementTheme.colors.textSecondary,
style = ElementTheme.typography.fontBodyMdRegular,
text = stringResource(CommonStrings.common_call_invite),
textAlign = TextAlign.Center,
text = stringResource(R.string.screen_room_timeline_legacy_call),
textAlign = TextAlign.Start,
)
}
}

View file

@ -56,7 +56,7 @@ class DefaultMessageSummaryFormatter @Inject constructor(
is TimelineItemVideoContent -> context.getString(CommonStrings.common_video)
is TimelineItemFileContent -> context.getString(CommonStrings.common_file)
is TimelineItemAudioContent -> context.getString(CommonStrings.common_audio)
is TimelineItemLegacyCallInviteContent -> context.getString(CommonStrings.common_call_invite)
is TimelineItemLegacyCallInviteContent -> context.getString(CommonStrings.common_unsupported_call)
is TimelineItemCallNotifyContent -> context.getString(CommonStrings.common_call_started)
}.take(MAX_SAFE_LENGTH)
}

View file

@ -31,6 +31,7 @@
<string name="screen_room_timeline_add_reaction">"Add emoji"</string>
<string name="screen_room_timeline_beginning_of_room">"This is the beginning of %1$s."</string>
<string name="screen_room_timeline_beginning_of_room_no_name">"This is the beginning of this conversation."</string>
<string name="screen_room_timeline_legacy_call">"Unsupported call. Ask if the caller can use the new Element X app."</string>
<string name="screen_room_timeline_less_reactions">"Show less"</string>
<string name="screen_room_timeline_message_copied">"Message copied"</string>
<string name="screen_room_timeline_no_permission_to_post">"You do not have permission to post to this room"</string>