Skip to content

Commit

Permalink
make relevant methods private, improve naming
Browse files Browse the repository at this point in the history
  • Loading branch information
xavimolloy committed Oct 5, 2023
1 parent 5aea3d4 commit 77ffbdc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import org.hisp.dhis.mobile.ui.designsystem.component.ListCard
import org.hisp.dhis.mobile.ui.designsystem.component.MetadataAvatar
import org.hisp.dhis.mobile.ui.designsystem.component.SubTitle
import org.hisp.dhis.mobile.ui.designsystem.resource.provideDHIS2Icon
import org.hisp.dhis.mobile.ui.designsystem.resource.provideImage
import org.hisp.dhis.mobile.ui.designsystem.theme.Spacing
import org.hisp.dhis.mobile.ui.designsystem.theme.SurfaceColor
import org.hisp.dhis.mobile.ui.designsystem.theme.TextColor
Expand Down Expand Up @@ -76,7 +75,7 @@ fun ListCardScreen() {
ListCard(
listAvatar = {
ListAvatar(
imagePainter = provideImage("dog"),
imagePainter = provideDHIS2Icon("dhis2_microscope_outline"),
style = ListAvatarStyle.IMAGE,
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,3 @@ import org.jetbrains.compose.resources.painterResource
@Composable
fun provideDHIS2Icon(resourceName: String): Painter =
painterResource("drawable/$resourceName.xml")

@OptIn(ExperimentalResourceApi::class)
@Composable
fun provideImage(resourceName: String): Painter =
painterResource("drawable/$resourceName.jpg")
Binary file not shown.

0 comments on commit 77ffbdc

Please sign in to comment.