Skip to content

Commit

Permalink
Fixing another NetImage size issue
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumBadger committed Jul 6, 2024
1 parent f6baa41 commit 8c299e5
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.CircleShape
Expand Down Expand Up @@ -101,7 +102,11 @@ fun NetImage(

is NetRequestStatus.Success -> {
Image(
modifier = Modifier.fillMaxWidth(),
modifier = if (cropToAspect == null) {
Modifier.fillMaxWidth()
} else {
Modifier.fillMaxSize()
},
bitmap = it.result.data,
contentDescription = null,
contentScale = if (cropToAspect == null) {
Expand Down

0 comments on commit 8c299e5

Please sign in to comment.