fix: update sidebar text to use string resources

This commit is contained in:
João Dematé Jr
2025-07-15 18:47:32 -03:00
parent 013f0c00cf
commit b14eb9006b
2 changed files with 8 additions and 7 deletions
@@ -1,8 +1,7 @@
package com.bitchat.android.ui
import com.bitchat.android.R
import android.util.Log
import androidx.compose.animation.*
import androidx.compose.animation.core.*
import androidx.compose.foundation.*
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
@@ -16,11 +15,12 @@ import androidx.compose.runtime.livedata.observeAsState
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.compose.ui.zIndex
/**
* Sidebar components for ChatScreen
@@ -140,7 +140,7 @@ private fun SidebarHeader() {
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = "YOUR NETWORK",
text = stringResource(id = R.string.your_network).uppercase(),
style = MaterialTheme.typography.titleMedium.copy(
fontWeight = FontWeight.Bold,
fontFamily = FontFamily.Monospace
@@ -175,7 +175,7 @@ fun ChannelsSection(
)
Spacer(modifier = Modifier.width(6.dp))
Text(
text = "CHANNELS",
text = stringResource(id = R.string.channels).uppercase(),
style = MaterialTheme.typography.labelSmall,
color = colorScheme.onSurface.copy(alpha = 0.6f),
fontWeight = FontWeight.Bold
@@ -255,7 +255,7 @@ fun PeopleSection(
)
Spacer(modifier = Modifier.width(6.dp))
Text(
text = "PEOPLE",
text = stringResource(id = R.string.people).uppercase(),
style = MaterialTheme.typography.labelSmall,
color = colorScheme.onSurface.copy(alpha = 0.6f),
fontWeight = FontWeight.Bold
@@ -264,7 +264,7 @@ fun PeopleSection(
if (connectedPeers.isEmpty()) {
Text(
text = "No one connected",
text = stringResource(id = R.string.no_one_connected),
style = MaterialTheme.typography.bodyMedium,
color = colorScheme.onSurface.copy(alpha = 0.5f),
modifier = Modifier.padding(horizontal = 24.dp, vertical = 8.dp)
+1
View File
@@ -16,4 +16,5 @@
<string name="online_users">Online Users</string>
<string name="no_one_connected">No one connected</string>
<string name="emergency_clear_hint">Triple tap to clear all data</string>
<string name="your_network">Your Network</string>
</resources>