Skip to content

Commit cdc39d1

Browse files
committed
Fix missing inbox title and Spanish resource plurals
1 parent 75ebae0 commit cdc39d1

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

app/src/main/kotlin/me/tylerbwong/stack/ui/inbox/InboxScreen.kt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,15 @@ fun InboxItem(item: InboxItem, onClick: () -> Unit) {
8787
) {
8888
ListItem(
8989
headlineContent = {
90-
Text(
91-
text = item.title.toHtml().toString(),
92-
modifier = Modifier.padding(top = 4.dp),
93-
fontWeight = FontWeight.Bold,
94-
overflow = TextOverflow.Ellipsis,
95-
maxLines = 1,
96-
)
90+
item.title?.let {
91+
Text(
92+
text = it.toHtml().toString(),
93+
modifier = Modifier.padding(top = 4.dp),
94+
fontWeight = FontWeight.Bold,
95+
overflow = TextOverflow.Ellipsis,
96+
maxLines = 1,
97+
)
98+
}
9799
},
98100
modifier = Modifier.padding(vertical = 4.dp),
99101
overlineContent = {

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
<plurals name="answers">
2020
<item quantity="one">%1$d Respuesta</item>
2121
<item quantity="many">%1$d Respuestas</item>
22+
<item quantity="other">%1$d Respuestas</item>
2223
</plurals>
2324

2425
<plurals name="votes">
2526
<item quantity="one">%1$d Voto</item>
2627
<item quantity="many">%1$d Votos</item>
28+
<item quantity="other">%1$d Votos</item>
2729
</plurals>
2830

2931
<!-- Profile -->
@@ -165,10 +167,12 @@
165167
<plurals name="add_comment_max_character">
166168
<item quantity="one">Queda %1$d carácter</item>
167169
<item quantity="many">Quedan %1$d caracteres</item>
170+
<item quantity="other">Quedan %1$d caracteres</item>
168171
</plurals>
169172
<plurals name="add_comment_too_many_characters">
170173
<item quantity="one">Demasiado largo por %1$d carácter</item>
171174
<item quantity="many">Demasiado largo por %1$d caracteres</item>
175+
<item quantity="other">Demasiado largo por %1$d caracteres</item>
172176
</plurals>
173177

174178
<!-- Search -->
@@ -180,6 +184,7 @@
180184
<plurals name="has_min_answers">
181185
<item quantity="one">Tiene al menos %1$d respuesta</item>
182186
<item quantity="many">Tiene al menos %1$d respuestas</item>
187+
<item quantity="other">Tiene al menos %1$d respuestas</item>
183188
</plurals>
184189
<string name="body_contains_title">El cuerpo contiene</string>
185190
<string name="body_contains">El cuerpo contiene \"%1$s\"</string>

stackexchange-api/src/main/kotlin/me/tylerbwong/stack/api/model/InboxItem.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ data class InboxItem(
2424
@Json(name = "site")
2525
val site: Site?,
2626
@Json(name = "title")
27-
val title: String,
27+
val title: String?,
2828
)

0 commit comments

Comments
 (0)