Skip to content

Commit b9acbf9

Browse files
committed
Fix bug where looking was showing in stopped
1 parent 578c10e commit b9acbf9

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

app/src/main/java/io/bloco/snowflake/ui/home/HomeScreen.kt

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,17 @@ private fun Stats(
222222
running.clientsConnected > 0 -> stringResource(R.string.snowflake_helping)
223223
else -> null
224224
},
225-
text = if (running != null && running.clientsConnected > 0) {
226-
pluralStringResource(
227-
R.plurals.persons,
228-
running.clientsConnected,
229-
running.clientsConnected,
230-
)
231-
} else {
232-
stringResource(R.string.snowflake_looking_to_help)
233-
},
225+
text = if (running != null) {
226+
if (running.clientsConnected > 0) {
227+
pluralStringResource(
228+
R.plurals.persons,
229+
running.clientsConnected,
230+
running.clientsConnected,
231+
)
232+
} else {
233+
stringResource(R.string.snowflake_looking_to_help)
234+
}
235+
} else null,
234236
)
235237
StatsCell(
236238
title = stringResource(R.string.snowflake_stats_connections),

0 commit comments

Comments
 (0)