Last active
May 12, 2025 10:59
-
-
Save ifucolo/7727c36e541092c84a655680a9ce5185 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun PrayersListScreen( | |
prayers: List<ViewType>, | |
onPrayerClicked: (PrayerSearch) -> Unit, | |
onNovenaClicked: (NovenaSearch) -> Unit, | |
onChapletClicked: (ChapletSearch) -> Unit | |
) { | |
LazyColumn( | |
modifier = Modifier | |
.fillMaxSize(), | |
contentPadding = PaddingValues( | |
top = SanctusDimensions.paddingMedium, | |
bottom = SanctusDimensions.searchBarPlusMargin, | |
start = SanctusDimensions.paddingMedium, | |
end = SanctusDimensions.paddingMedium | |
), | |
verticalArrangement = Arrangement.spacedBy( | |
space = SanctusDimensions.paddingMedium | |
) | |
) { | |
items(prayers) { prayer -> | |
when (prayer) { | |
is PrayerSearch -> { | |
PrayerCardItem( | |
prayer = prayer, | |
onClick = { | |
onPrayerClicked(prayer) | |
} | |
) | |
} | |
is NovenaSearch -> { | |
NovenaCardItem( | |
novena = prayer, | |
onClick = { | |
onNovenaClicked(prayer) | |
} | |
) | |
} | |
is ChapletSearch -> { | |
ChapletCardItem( | |
chaplet = prayer, | |
onClick = { | |
onChapletClicked(prayer) | |
} | |
) | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment