Skip to content

Commit eec16a8

Browse files
authored
Merge pull request #571 from code-payments/chore/string-res-chat-list
chore: stringRes list screens
2 parents 5e246f6 + e08a726 commit eec16a8

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

app/src/main/java/com/getcode/view/main/balance/BalanceSheet.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ fun BalanceContent(
209209
CodeCircularProgressIndicator()
210210
Text(
211211
modifier = Modifier.fillMaxWidth(0.6f),
212-
text = "Loading your balance and transaction history",
212+
text = stringResource(R.string.subtitle_loadingBalanceAndTransactions),
213213
textAlign = TextAlign.Center
214214
)
215215
}

app/src/main/java/com/getcode/view/main/chat/list/ChatListScreen.kt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ import androidx.compose.runtime.remember
1818
import androidx.compose.ui.Alignment.Companion.CenterHorizontally
1919
import androidx.compose.ui.Alignment.Companion.CenterVertically
2020
import androidx.compose.ui.Modifier
21+
import androidx.compose.ui.res.stringResource
2122
import androidx.compose.ui.text.style.TextAlign
23+
import com.getcode.R
2224
import com.getcode.navigation.core.LocalCodeNavigator
2325
import com.getcode.navigation.screens.ChatByUsernameScreen
2426
import com.getcode.navigation.screens.ConversationScreen
@@ -45,9 +47,11 @@ fun ChatListScreen(
4547
bottomBar = {
4648
Box(modifier = Modifier.fillMaxWidth()) {
4749
CodeButton(
48-
modifier = Modifier.fillMaxWidth().padding(horizontal = CodeTheme.dimens.inset),
50+
modifier = Modifier
51+
.fillMaxWidth()
52+
.padding(horizontal = CodeTheme.dimens.inset),
4953
buttonState = ButtonState.Filled,
50-
text = "Start a New Chat"
54+
text = stringResource(R.string.action_startNewChat)
5155
) {
5256
navigator.push(ChatByUsernameScreen)
5357
}
@@ -79,7 +83,7 @@ fun ChatListScreen(
7983
CodeCircularProgressIndicator()
8084
Text(
8185
modifier = Modifier.fillMaxWidth(0.6f),
82-
text = "Loading your chats",
86+
text = stringResource(R.string.subtitle_loadingChats),
8387
textAlign = TextAlign.Center
8488
)
8589
}
@@ -97,7 +101,7 @@ fun ChatListScreen(
97101
) {
98102
Text(
99103
modifier = Modifier.padding(vertical = CodeTheme.dimens.grid.x1),
100-
text = "You don't have any chats yet.",
104+
text = stringResource(R.string.subtitle_dontHaveChats),
101105
color = CodeTheme.colors.textSecondary,
102106
style = CodeTheme.typography.textMedium
103107
)

app/src/main/res/values/strings.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,8 @@
5858
<string name="subtitle_tipCardBack">Scan to download the app, and then scan the code on the other side to tip</string>
5959

6060
<string name="action_payToChat">Send %1$s to Start Chatting</string>
61+
<string name="subtitle_loadingBalanceAndTransactions">Loading your balance and transaction history</string>
62+
<string name="subtitle_loadingChats">Loading your chats</string>
63+
<string name="action_startNewChat">Start a New Chat</string>
64+
<string name="subtitle_dontHaveChats">You don\'t have any chats yet.</string>
6165
</resources>

0 commit comments

Comments
 (0)