Skip to content

Commit c4a4277

Browse files
committed
Cleaned up commented code
1 parent f9350c5 commit c4a4277

File tree

2 files changed

+0
-156
lines changed

2 files changed

+0
-156
lines changed

app/src/main/java/com/mumbicodes/projectie/presentation/screens/allProjects/AllProjectsScreenRoute.kt

Lines changed: 0 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -339,157 +339,6 @@ fun AllProjectsScreenContent(
339339
}
340340
}
341341
}
342-
/*
343-
* if (projectsScreenState.data.filteredProjects.isEmpty()) {
344-
if (searchedText.isEmpty()) {
345-
EmptyStateSection(
346-
filter = projectsScreenState.data.selectedProjectStatus,
347-
projects = projectsScreenState.data.projects
348-
)
349-
} else {
350-
ErrorStateSlot(
351-
illustration = R.drawable.empty_state,
352-
description = R.string.projectsErrorText,
353-
searchParam = searchedText,
354-
filter = projectsScreenState.data.selectedProjectStatus,
355-
)
356-
}
357-
} else {
358-
LazyVerticalStaggeredGrid(
359-
columns = rememberProjectsColumns(windowWidthSizeClass = windowWidthSizeClass),
360-
contentPadding = PaddingValues(bottom = Space20dp),
361-
modifier = Modifier
362-
.fillMaxSize()
363-
.padding(start = Space20dp, end = Space20dp),
364-
verticalArrangement = Arrangement.spacedBy(Space16dp),
365-
horizontalArrangement = Arrangement.spacedBy(Space16dp)
366-
) {
367-
items(projectsScreenState.data.filteredProjects) { project ->
368-
ProjectItem(
369-
// modifier = Modifier.padding(Space8dp),
370-
project = project,
371-
onClickProject = onClickProject
372-
)
373-
}
374-
}
375-
}
376-
* */
377-
378-
/*if (projectsScreenState.data.projects.isEmpty()) {
379-
if (projectsScreenState.isLoading) {
380-
ShimmerEffectComposable()
381-
} else {
382-
EmptyStateSlot(
383-
illustration = R.drawable.add_project,
384-
title = R.string.allProjects,
385-
description = R.string.allProjectsEmptyText,
386-
)
387-
}
388-
} else {
389-
Column(modifier = modifier) {
390-
WelcomeMessageSection(
391-
modifier = Modifier
392-
.fillMaxWidth()
393-
.padding(
394-
start = Space20dp,
395-
end = Space20dp,
396-
),
397-
projects = projectsScreenState.data.projects
398-
)
399-
Spacer(modifier = Modifier.height(Space24dp))
400-
401-
RequestNotifications(
402-
hasRequestedNotificationPermission = projectsScreenState.data.hasRequestedNotificationPermission,
403-
onClickNotBtn = onClickNotBtn
404-
)
405-
406-
Row(
407-
modifier = Modifier
408-
.fillMaxWidth()
409-
.padding(
410-
start = Space20dp,
411-
end = Space20dp,
412-
),
413-
verticalAlignment = Alignment.CenterVertically,
414-
) {
415-
SearchBar(
416-
modifier = Modifier.weight(1f),
417-
searchParamType = stringResource(id = R.string.projects),
418-
searchedText = searchedText,
419-
onSearchParamChanged = onSearchParamChanged
420-
)
421-
422-
Spacer(modifier = Modifier.width(8.dp))
423-
424-
IconButton(
425-
modifier = Modifier
426-
.size(48.dp)
427-
.clip(MaterialTheme.shapes.small)
428-
.background(MaterialTheme.colorScheme.surface),
429-
onClick = onClickFilterBtn,
430-
) {
431-
Icon(
432-
painter = painterResource(id = R.drawable.ic_filter),
433-
contentDescription = "Filter projects",
434-
tint = MaterialTheme.colorScheme.onSurface
435-
)
436-
}
437-
}
438-
439-
Spacer(modifier = Modifier.height(Space16dp))
440-
441-
LazyRow(
442-
modifier = Modifier.fillMaxWidth(),
443-
verticalAlignment = Alignment.CenterVertically,
444-
contentPadding = PaddingValues(horizontal = Space20dp),
445-
horizontalArrangement = Arrangement.spacedBy(Space8dp)
446-
) {
447-
itemsIndexed(projectsScreenState.data.filtersStatus) { _, filter ->
448-
com.mumbicodes.projectie.presentation.designsystem.components.FilterChip(
449-
text = filter,
450-
selected = filter == projectsScreenState.data.selectedProjectStatus,
451-
onClick = onClickFilterStatus,
452-
)
453-
}
454-
}
455-
456-
Spacer(modifier = Modifier.height(Space8dp))
457-
458-
if (projectsScreenState.data.filteredProjects.isEmpty()) {
459-
if (searchedText.isEmpty()) {
460-
EmptyStateSection(
461-
filter = projectsScreenState.data.selectedProjectStatus,
462-
projects = projectsScreenState.data.projects
463-
)
464-
} else {
465-
ErrorStateSlot(
466-
illustration = R.drawable.empty_state,
467-
description = R.string.projectsErrorText,
468-
searchParam = searchedText,
469-
filter = projectsScreenState.data.selectedProjectStatus,
470-
)
471-
}
472-
} else {
473-
LazyVerticalStaggeredGrid(
474-
columns = rememberProjectsColumns(windowWidthSizeClass = windowWidthSizeClass),
475-
contentPadding = PaddingValues(bottom = Space20dp),
476-
modifier = Modifier
477-
.fillMaxSize()
478-
.padding(start = Space20dp, end = Space20dp),
479-
verticalArrangement = Arrangement.spacedBy(Space16dp),
480-
horizontalArrangement = Arrangement.spacedBy(Space16dp)
481-
) {
482-
items(projectsScreenState.data.filteredProjects) { project ->
483-
ProjectItem(
484-
// modifier = Modifier.padding(Space8dp),
485-
project = project,
486-
onClickProject = onClickProject
487-
)
488-
}
489-
}
490-
}
491-
}
492-
}*/
493342
}
494343

495344
@Composable

app/src/main/java/com/mumbicodes/projectie/presentation/screens/allProjects/AllProjectsStates.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,3 @@ val filters = listOf(
4747
"In Progress",
4848
"Completed",
4949
)
50-
51-
data class AllProjectsScreenStates(
52-
val isLoading: Boolean = false,
53-
val data: AllProjectsStates = AllProjectsStates(),
54-
)

0 commit comments

Comments
 (0)