Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: image preview not displayed in compose sheet #94

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.PopupProperties
import androidx.compose.ui.zIndex
import coil.ImageLoader
import coil.compose.AsyncImage
import kotlinx.coroutines.launch
import me.mudkip.moememos.R
Expand All @@ -38,10 +40,13 @@ fun InputImage(
) {
var menuExpanded by remember { mutableStateOf(false) }
val scope = rememberCoroutineScope()
val context = LocalContext.current
val userStateViewModel = LocalUserState.current

Box {
AsyncImage(
model = resource.uri(LocalUserState.current.host).toString(),
imageLoader = ImageLoader.Builder(context).okHttpClient(userStateViewModel.okHttpClient).build(),
contentDescription = null,
modifier = Modifier
.fillMaxHeight()
Expand Down