Skip to content

Commit 7def4d1

Browse files
committed
fix: blank space when graph has not been interacted with
1 parent 604fefa commit 7def4d1

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

  • app/src/main/java/com/tien/piholeconnect/ui/screen/home

app/src/main/java/com/tien/piholeconnect/ui/screen/home/HomeScreen.kt

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -239,17 +239,15 @@ fun HomeScreen(viewModel: HomeViewModel = viewModel()) {
239239
style = MaterialTheme.typography.h6
240240
)
241241
Column(Modifier.alpha(if (permittedQueriesCount != null && blockedQueriesCount != null) 1f else 0f)) {
242-
if (formattedStartTime != null && formattedEndTime != null) {
243-
Text(
244-
String.format(
245-
stringResource(
246-
R.string.home_queries_chart_time_info,
247-
formattedStartTime,
248-
formattedEndTime
249-
)
250-
), style = MaterialTheme.typography.caption
251-
)
252-
}
242+
Text(
243+
String.format(
244+
stringResource(
245+
R.string.home_queries_chart_time_info,
246+
formattedStartTime ?: "",
247+
formattedEndTime ?: ""
248+
)
249+
), style = MaterialTheme.typography.caption
250+
)
253251
Text(
254252
"%s: %d".format(
255253
stringResource(R.string.home_queries_chart_permitted_queries_label),

0 commit comments

Comments
 (0)