Skip to content

Commit

Permalink
Apply default image size
Browse files Browse the repository at this point in the history
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
  • Loading branch information
ellykits committed Oct 28, 2024
1 parent 1402998 commit 8a0ea0c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ data class ImageProperties(
val tint: String? = null,
val text: String? = null,
val imageConfig: ImageConfig? = null,
val size: Int? = null,
val size: Int? = 22,
val shape: ImageShape? = null,
val textColor: String? = null,
val actions: List<ActionConfig> = emptyList(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ fun ClickableImageIcon(
)
.conditional(
imageProperties.size != null,
{ size(imageProperties.size!!.dp) },
{ size(if (imageProperties.size!! >= 22) imageProperties.size!!.dp else 16.dp) },
{ size(20.dp) },

Check warning on line 145 in android/quest/src/main/java/org/smartregister/fhircore/quest/ui/shared/components/Image.kt

View check run for this annotation

Codecov / codecov/patch

android/quest/src/main/java/org/smartregister/fhircore/quest/ui/shared/components/Image.kt#L145

Added line #L145 was not covered by tests
)
.conditional(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import androidx.test.core.app.ApplicationProvider
import dagger.hilt.android.testing.HiltAndroidRule
import dagger.hilt.android.testing.HiltAndroidTest
import dagger.hilt.android.testing.HiltTestApplication
import javax.inject.Inject
import kotlin.test.assertTrue
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.async
import kotlinx.coroutines.flow.first
Expand Down Expand Up @@ -48,8 +50,6 @@ import org.smartregister.fhircore.engine.util.DefaultDispatcherProvider
import org.smartregister.fhircore.engine.util.SharedPreferencesHelper
import org.smartregister.fhircore.quest.app.fakes.Faker
import org.smartregister.fhircore.quest.robolectric.RobolectricTest
import javax.inject.Inject
import kotlin.test.assertTrue

@ExperimentalCoroutinesApi
@HiltAndroidTest
Expand Down

0 comments on commit 8a0ea0c

Please sign in to comment.