Skip to content

Commit

Permalink
fix : !! 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
HamBP committed Dec 15, 2024
1 parent 03a6a83 commit c55ff7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fun ShowDetailContentScreen(
val uriHandler = LocalUriHandler.current
val scrollState = rememberScrollState()
val uiState by viewModel.uiState.collectAsStateWithLifecycle()
val notice = uiState.showDetail!!.notice
val notice = uiState.showDetail?.notice ?: return
val urlParser = UrlParser(notice)

Scaffold(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ fun ShowImagesScreen(
viewModel: ShowDetailViewModel = hiltViewModel(),
) {
val uiState by viewModel.uiState.collectAsStateWithLifecycle()
val showDetail = uiState.showDetail ?: return

val pageState = rememberPagerState(
initialPage = index, initialPageOffsetFraction = 0f
) { uiState.showDetail!!.images.size }
) { showDetail.images.size }

Scaffold(
topBar = { BtCloseableAppBar(onClickClose = onBackPressed) },
Expand All @@ -57,7 +58,7 @@ fun ShowImagesScreen(
modifier = Modifier
.fillMaxSize()
.zoomable(rememberZoomState()),
model = uiState.showDetail!!.images[it].originImage,
model = showDetail.images[it].originImage,
contentDescription = null,
contentScale = ContentScale.Fit,
)
Expand Down

0 comments on commit c55ff7b

Please sign in to comment.