Skip to content

Commit 8f80160

Browse files
Revert "feat: Add empty state landing page (#26)" (#27)
This reverts commit 1f77657.
1 parent 1f77657 commit 8f80160

File tree

1 file changed

+6
-32
lines changed
  • app/src/main/java/com/yogeshpaliyal/deepr/ui/screens

1 file changed

+6
-32
lines changed

app/src/main/java/com/yogeshpaliyal/deepr/ui/screens/Home.kt

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -297,34 +297,6 @@ fun Content(viewModel: AccountViewModel) {
297297
}
298298
}
299299

300-
@Composable
301-
fun EmptyState() {
302-
Column(
303-
modifier = Modifier.fillMaxSize(),
304-
verticalArrangement = Arrangement.Center,
305-
horizontalAlignment = Alignment.CenterHorizontally
306-
) {
307-
Icon(
308-
imageVector = TablerIcons.Search,
309-
contentDescription = "No deeplinks found",
310-
modifier = Modifier.height(64.dp),
311-
tint = MaterialTheme.colorScheme.primary
312-
)
313-
Spacer(modifier = Modifier.height(16.dp))
314-
Text(
315-
text = "No deeplinks found",
316-
style = MaterialTheme.typography.headlineMedium,
317-
color = MaterialTheme.colorScheme.onSurface
318-
)
319-
Spacer(modifier = Modifier.height(8.dp))
320-
Text(
321-
text = "Add a deeplink to get started.",
322-
style = MaterialTheme.typography.bodyLarge,
323-
color = MaterialTheme.colorScheme.onSurfaceVariant
324-
)
325-
}
326-
}
327-
328300
@Composable
329301
fun DeeprList(
330302
modifier: Modifier = Modifier,
@@ -334,10 +306,12 @@ fun DeeprList(
334306
onShortcutClick: (Deepr) -> Unit,
335307
onItemLongClick: (Deepr) -> Unit
336308
) {
337-
if (accounts.isEmpty()) {
338-
EmptyState()
339-
} else {
340-
LazyColumn(modifier = modifier, contentPadding = PaddingValues(vertical = 8.dp)) {
309+
LazyColumn(modifier = modifier, contentPadding = PaddingValues(vertical = 8.dp)) {
310+
if (accounts.isEmpty()) {
311+
item {
312+
Text(text = "No deeplinks found.")
313+
}
314+
} else {
341315
items(accounts) { account ->
342316
DeeprItem(
343317
account = account,

0 commit comments

Comments
 (0)