From ecbca71d133421c24050f3d2ececf9c2bbdd5dce Mon Sep 17 00:00:00 2001 From: Norbel AMBANUMBEN Date: Mon, 13 May 2024 09:42:47 +0100 Subject: [PATCH] feat: remove title for dashboard when there is no `ooni` provided test --- .../ooniprobe/fragment/dashboard/DashboardViewModel.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/openobservatory/ooniprobe/fragment/dashboard/DashboardViewModel.kt b/app/src/main/java/org/openobservatory/ooniprobe/fragment/dashboard/DashboardViewModel.kt index 873b6403c..900d0f0f8 100644 --- a/app/src/main/java/org/openobservatory/ooniprobe/fragment/dashboard/DashboardViewModel.kt +++ b/app/src/main/java/org/openobservatory/ooniprobe/fragment/dashboard/DashboardViewModel.kt @@ -64,7 +64,9 @@ class DashboardViewModel @Inject constructor( groupedItemList.addAll(itemList) } if (ooniRunDescriptors.isNotEmpty()) { - groupedItemList.add(oonRunLinksTitle) + if (groupedItems.isNotEmpty()) { + groupedItemList.add(oonRunLinksTitle) + } groupedItemList.addAll(ooniRunDescriptors) } this.groupedItemList.value = groupedItemList